The key is the twenty-character code printed near the top of the back cover of the Command & Conquer 3: Kane's Wrath manual.
If you bought the game second-hand without the manual, the code is sometimes also printed on a sticker on the disc sleeve — otherwise you'll need to contact the publisher's support, and they'll usually ask for proof of purchase.