DR Jennifer - Ice is not good for burns since the ice could end up freezing the damaged skin, thus causing more damage. Cool compresses, and cool water are preferred. I think the only reason people think/thought butter worked was due to the fact that butter is stored in the fridge - thus it cools down the skin. But, as DR Cillaliz noted, it can lead to an infection.
And, yes, take a pain reliever/anti-inflammatory. A burn causes pain and inflammation, so... (Duh!).

A burn is going to hurt no matter what you put on it. Until your skin starts healing, it's going to hurt. Burn creams and other topical treatments are only temporary fixes, pain relievers. Above all, keep your skin clean.