No, there is no cheat code to unlock all the Ghosts in Yu-Gi-Oh! World Championship 2009. The Ghosts are not something you unlock through a code at all.
Instead, they represent other real Yu-Gi-Oh! players that you download over Wi-Fi. Each Ghost stays with you for about 24 hours, after which you will need to download a fresh batch to keep the feature going.