Get the beer and bottles very cold before bottling. I put my sanitizer in the freezer or fridge with my bottles. It will cut down on the foaming. Another trick is to slightly over carbonate your beer before bottling. That way if you lose a little CO2 in transfer, it is not too big of a deal...