You'd need to insert it when you boot to gateway mode. Basically, it would go something like this (using a downgraded 3DS):
1. After you're done playing a DS game, you'd install the exploit (from the DSTwo).
2. Once installed, insert the red Gateway card.
3. Run the exploit (by going into the...