Here's what you should do:
Stay calm. Open driver's side door. There is this magical button behind the steering wheel that automatically opens the trunk. The owner's manual calls it the "trunk release". Problem solved!
Here's what not to do:
Laugh hysterically with your friend and say, "Oh no! What do we do??" Then crawl in the backseat and attempt to lay the back seat down. When you can't figure it out, ask her to get in the glove box and get the owner's manual out for the car that you've owned for the last 4 years. Look up "back seat" and realize that the button to release it down is also in the trunk. Then climb out of the back seat and sit in the driver's seat and mindlessly chat with your friend for the next 15 minutes or so. Then, suddenly notice the magical button mentioned above. Push it, look at the friend in utter amazement and burst out laughing because you've literally just locked yourself inside your own car.