You should have your bottles ice cold when you are bottling. When the dissolved CO2 in the beer hits the warm bottles, it comes out of solution (foam). If you keep the bottles as cold or colder than the beer, you should be better off with significantly less foam..
I'm assuming you are using a...