How much foam are we taling about in your case? Was the honey warm or cold when you bottled it? Was the honey warm when you put it into the bottling tank?
Foam is air that has gotten into the honey, of course. So, if the honey falls a great distance into the tank that you are bottling out of, while it is warm, you will have air in your honey.
I warm my honey and then strain it. Then let it sit in the buckets over night, which lets it cool some. Then, the next morning I pour it into my tank and warm it again to bottle it. Only the last of the tank has foam in it. Which I usually don't put into the jars.
You may have a smaller bottling unit.