Before Shrek and Donkey rescue Princess Fiona in the first film (despite Shrek's deal with Lord Farquaad), King Harold and Queen Lillian – desperate to lift their daughter's curse – meet with con artist Rumpelstiltskin, who wishes to become King of Far Far Away in exchange for helping them. But before the deal is signed, Harold and Lillian learn that Fiona has been rescued. Rumpelstiltskin is then shown to have become washed up as a result and subsequently bitter towards Shrek for inadvertently ruining his plans.
In the present, Shrek has steadily grown tired of being a family man and celebrity among the local villagers, leading him to yearn for the days when he felt like a "real ogre". He takes his family to Far Far Away to celebrate his children's first birthday. Shrek gets annoyed when the three little pigs eat the kids' cake along with most of the other party food. A boy named Butterpants (who is said to be a "big fan" of Shrek) demands that Shrek roar. After he lets out a frustrated roar the entire crowd cheers, reinforcing his belief that no one considers him to be a true ogre. This coupled with the fact that the birthday cakes were decorated with a "cute" Ogre named "Sprinkles" finally makes Shrek lose his temper and smashes the new birthday cake in front of everyone, then walks out in anger. He and Fiona argue outside about his reaction which ends with Shrek rashly agreeing that he was happier before he'd rescued her.
After storming off, Shrek encounters Rumpelstiltskin. Rumpel, who had observed Shrek's angry outburst with Fiona, seizes his chance. He follows Shrek and arranges what appears to be an accident where he is trapped under his carriage. Shrek helps him and Rumpel being "grateful", gives Shrek a ride and a meal. When Shrek voices his frustrations, Rumpel offers to give Shrek a day to live like a real ogre in exchange for a day from his childhood that he would not remember being erased. Shrek signs the contract and appears in a reality