Captain Hook is a minor character in Shrek 2 and the tertiary antagonist in Shrek the Third.
He is a pirate captain and former pianist at the inn of the Poisoned Apple who joined Charming's villain group but reformed due to Arthur's words. He hoped to become a florist mainly planting daffodils.
Captain Hook is based off of the character the same name from Peter Pan by famed English author J.M. Barrie. However he is also a parody of Disney's portrayal of Hook.
Desire being evil, Captain Hook mainly wanted to be respected by the heroes, hence why he joined Charming's coup. However, Hook realized the error of his ways once Arthur tells them they don't have to let there villainy stand in the way between them because the only person standing in between them and their happiness is themselves. Hook admits to wanting to plant daffodils because he thinks they're lovely.