Using a friend code in Animal Crossing: Wild World is straightforward. Head to the main gate in town and look for the dog standing on your right.
Talk to the dog, then scroll to the bottom of the options list and select "friend code." From there you can view and manage your code, and you're all set to connect with friends.