Fiona is invited to Far Far Away after her parents learn she is married, her and Shrek go there with Donkey, however nobody was expecting Fiona to be married to an ogre thus creating tension between Shrek and the king.
So, while the king begins plotting with the fairy god mother so that Fiona and Prince Charming get together, Shrek and Donkey are out and about when suddenly they're greeted by one of the best Dreamworks characters every developed, Puss in Boots.Puss attacks them, but after a bit they join sides as they all find themselves inside of a potion factory. Shrek searches for a potion, but instead of the result he was hoping for, he turns to a human overnight while Donkey is now a noble steed.
Meanwhile, back at the castle, Fiona has become human as well, who is then greeted by Prince Charming and now convinced that he is Shrek. The King is slowly beginning to regret his decision, but now Shrek is on the move to return to the castle and get his wife back. Time skip ahead, we see the fairy god mother singing on the piano in a red dress as Shrek and his friends break out of prison and into the castle with the help of a huge f**king gingerbread man. We soon find out that the fairy god mother is Prince Charming's mother, as she's about to turn Shrek into a frog. But the King takes the blast instead, and soon enough the godmother is dead, and they all live happily ever after with a cat and donkey singing at the end.
After the credits, we see that the dragon from the first movie has returned with donky/dragon hybrids, now confirming Donkey as a proud father.