Captain Hook (voiced by Ian McShane in the third movie) appears in Shrek 2 in the bar of the Poison Apple, where he plays the piano and sings "Little Drop of Poison" (his singing voice during that song was provided by Tom Waits) and "People Just Ain't No Good" (his singing voice during that song was provided by Nick Cave) in the other. He appears inShrek the Third as the tertiary antagonist, working for Prince Charming. When Artie convinces the villains to give up evil, Hook states that he grows daffodils and they are beautiful. Captain Hook is the first who throws his weapon down and becomes good.
Captain Hook also appears as a contestant in the Far Far Away Idol feature on the Shrek 2 DVD with his singing voice provided by Matt Mahaffey. He begins to sing "Hooked On A Feeling" until Tinkerbell (whom Hook poisons in the classic Peter Pan story) prompts Simon Cowell to remove him from the stage.
Captain Hook does not appear in Shrek Forever After, but his voice is heard in the soundtrack, and he makes a cameo in the book opening of the film holding some daffodils.