There is no code, but a fan method does the rounds:
Be clear about what this is: an unfinished visual easter egg rather than a playable character. Dark Sonic is not a real unlockable in Super Smash Bros. Brawl, and the "summoning" steps are community invention rather than anything the game actually implements.