How do I get the cake in Portal?
You need to think with Portals!
Look up in the direction you are heading to the fire; you can spawn a portal on the wall up there, one to your right, and teleport out of danger.
After that, keep trying to reach the party to get your promised cake!
You should try to escape from the room with the fire without dying. The cake is... later.
If you shoot a portal above the flames, and a portal on a wall you can jump into, you will get onto the shelf above them. In my opinion, it is about this point that the fun really gets started... (Hint - this is not then end of the game, by a long way!)