Shaving cream is good to put on burns. Leave it on until the pain stops, gently rinse off with cool water. If the pain continues repeat the process. In case of severe burns, go to the er, but you can still soak yourself down with shaving cream first and then go.
You can feel the shaving cream pulling the heat out of the burn.
Likewise it will decrease the pain as well.