"Shanghaied" is an episode of the animated TV series SpongeBob SquarePants which makes suitable viewing for Halloween. It first aired in the United States on Nickelodeon on March 9, 2001.
An anchor gets lodged into SpongeBob's house, so SpongeBob, Patrick and Squidward all climb the rope to see who is responsible. It turns out it's The Flying Dutchman's ship, and he enslaves them to work as crew members on deck for the rest of their lives. Squidward, however, is quickly thrown overboard because he is so annoying. SpongeBob and Patrick love being slaves on board his ghostly ship and it drives the Dutchman crazy. An angry Dutchman resigns to eat them the next day, so SpongeBob and Patrick decide to steal his special dining socks in retaliation. The Dutchman agrees to grant them three wishes in exchange for the socks.