As far as I remember the Roku itself requires no code; Just the channels that you want to activate and not all channels require a code.
That was true when I first setup my original ROKU (now called the HD). However, when I recently setup the new XR we got, the initial setup did give me a code to link the box to the channel store (presumably so that the new ROKU had the channel store's ability to add/remove content from the box). So I think ROKU (the company) may now be requiring you to enter a "code" (to the channel store) as part of initial setup.
However, whichever code the OP is talking about (and the OP didn't specify), the advice is the same. The code is simply a way to link a specific ROKU to the web service in question. So you startup the ROKU, and (after initial bootkup) try to use the remote to go into the service you are interested in (or in the case of the initial setup, proceed through the initial setup questions until the code shows on the screen). If/when the service doesn't actually start up, but instead gives you a code with instructions for linking it to a web site, than that is the code you need to enter into the specific web site (in order to activate that service/channel on your ROKU, by linking it to your account on that web site).
NOTE: If you don't yet have an account on the web site in question, than you will need to create one to link it to the ROKU. In the case of the "channel store" (which may now be a mandatory linkage for the ROKU), you will need to create a free account at https://owner.roku.com/Account/Login/
before proceeding with the rest of your ROKU activation.