A token typed into definitions.py ends up in version control, in the UI and in every copy of the repository. Use dg.EnvVar("SHOP_API_TOKEN") instead: the resource stores the variable's name, and Dagster reads the value from the environment when a run starts. The UI shows the variable name, never the secret.
os.getenv("SHOP_API_TOKEN") looks similar but is worse: it reads the value when the module is imported, shows it as a plain string in the resource config, and silently passes None when the variable is missing.
For numbers, dg.EnvVar.int("SHOP_PAGE_SIZE") converts the text to an integer. Locally, a .env file next to the project sets variables for dg dev; in a deployment each environment sets its own values, which is how staging and production use different tokens with the same code. If a variable is missing where the run executes, the run fails and the error names it. This workspace sets SHOP_API_TOKEN and SHOP_PAGE_SIZE for you.
The token is resolved from the environment when the run starts.