I'm not sure exactly what kind of code you're asking about, but I'll try to answer anyway...
You mention Special, under the heart icon, so I guess you have a V5 (Familitchi.)
When you go to TamaExpo (the TamaTown for the V5), you need to enter a login password from your V5 into the TamaExpo web site. To get a login password, select PC, under the heart icon. Don't press any buttons on your V5 until you are ready to enter a logout password from the TamaExpo site into your V5. Then (while at the login password screen on your V5,) press the A (left) button to go to the logout password entry screen. Use the A button to scroll through the digits, and the B (middle) button to select. The C (right) button erases a digit.
On the other hand, perhaps you mean that have found a shop code for a V3, V4, or V4.5 on Tamagotchi.com. These don't work on a V5. Can you show us an example of a special code from TamaTown.com that you're trying to input?