The code is usually printed on a white sticker on the back of the game manual or the safety booklet inside the case.
For The Sims 3 and all its expansion packs and stuff packs, this code is most often a 20-character string of letters and numbers (often grouped in blocks of five). These codes act as your digital purchase receipt and are essential for registering the game to your EA account. sims 3 expansion pack codes