Shrek 2 is a 2004 American computer-animated comedy film loosely based on the 1990 picture book of the same name by William Steig. The sequel to Shrek (2001) and the second installment in the Shrek franchise, the film was directed by Andrew Adamson, Kelly Asbury, and Conrad Vernon from a screenplay written by Adamson, Joe Stillman, J. David Stem, and David N. Weiss. It stars Mike Myers, Eddie Murphy, Cameron Diaz, Julie Andrews, Antonio Banderas, John Cleese, Rupert Everett, and Jennifer Saunders. In the film, Shrek (Myers) and Donkey (Murphy) team up with the swashbuckling cat Puss in Boots (Banderas) to foil plans by Fiona's Fairy Godmother (Saunders) to destroy Shrek and Fiona's marriage.
Development began in 2001, and following disagreements with producers, the first film's screenwriters Ted Elliott and Terry Rossio were replaced with Adamson. The story was inspired by Guess Who's Coming to Dinner (1967), and new animation tools were utilized to improve the visual appearance of each character, particularly Puss in Boots. The lead actors also received a significant bump in salary to $10 million, which at the time was among the highest contracts in their respective careers. Like its predecessor, Shrek 2 also parodies other films based on fairy tales and features references to American popular culture.Shrek 2 premiered at the 2004 Cannes Film Festival, where it competed for the Palme d'Or, and it was released in theaters on May 19, 2004. Met with highly favorable reviews like its predecessor, the film grossed US$928.7 million worldwide. It scored the second-largest three-day opening weekend in U.S. history and the largest opening for an animated film at the time of its release. It went on to become the highest-grossing film of 2004 worldwide. Shrek 2 is also DreamWorks Animation's most successful film to date, and it held the title of being the highest-grossing animated film of all time worldwide until Toy Story 3 surpassed it in 2010. The film received two Academy Award nominations for Best Animated Feature and Best Original Song, and its associated soundtrack charted in the Top 10 on the US Billboard 200. A sequel to the film, Shrek the Third, was released in May 2007.