Shrek the Third is a 2007 American computer-animated fantasy comedy film produced by DreamWorks Animation and distributed by Paramount Pictures. It is the third installment in the Shrek film series and the sequel to Shrek 2 (2004). The film was directed by Chris Miller and written by William Steig, Joe Stillman, J. David Stem, David Weiss, and Mike Mitchell. It stars the voices of Mike Myers, Eddie Murphy, Cameron Diaz, Julie Andrews, John Cleese, Rupert Everett, Eric Idle, and Antonio Banderas.
The story begins with Shrek and Fiona expecting their first child. However, King Harold falls ill and Shrek is tasked with finding a suitable heir to the throne of Far Far Away. Harold reveals that he made a deal with the Fairy Godmother to ensure Fiona would marry Prince Charming. He also tells Shrek that if he doesn't become king, Prince Charming will marry Fiona and take over the kingdom. Harold dies, and Shrek, Fiona, and Donkey set off on a quest to find Arthur Pendragon, Fiona's cousin and the rightful heir to the throne.
Meanwhile, Prince Charming, along with his father, King Charming, plots to take over Far Far Away. They enlist the help of various fairy tale villains, including Captain Hook and the Three Little Pigs, to capture Shrek and his friends. Shrek, Donkey, and Puss in Boots eventually find Arthur, who is a student at a magical boarding school and is unaware of his royal destiny. Arthur is reluctant to become king, but Shrek convinces him to accept his responsibilities.
As Shrek and his companions return to Far Far Away, they are captured by Prince Charming and his henchmen. Arthur, however, manages to escape and rallies the fairy tale heroes to fight against Prince Charming. A battle ensues, and Arthur ultimately defeats Prince Charming, saving the kingdom. Shrek and Fiona decide not to become king and queen, and instead, they return to their swamp with their newborn triplets. The film ends with Shrek and Fiona enjoying their family life in the swamp.