Download the game, then donate to the developing team via PayPal. Even if you only donate one third of the cost you'd pay in the store, it's ten times more than the team would make off one cartrige.
And remember that for every pirate playing ROMs, there are enough people buying the game to make it worth while and cover post-developement manufacturing costs. That is, if the game is any good. So having, on average, one in a hundred pirates buy, on average, one in a hundred game titles, won't influence the market.
I like having cartriges, and I buy DS games, but I'm getting increasingly uncomfortable giving away my money to thousands of layers of middlemen instead of actually paying for what I'm playing. I hate the thought of the money I paid for "my" game covering the losses of some other game by the same publisher. In effect, I'm paying for the marketing of crappy games I would never pay for, by buying the game I want. The money I paid for "Doomathon 3: Decapitation" shouldn't cover the losses generated by "World of curling", or go towards the marketing promotion of "Sim-hide-and-seek", it should go to the developing team of Doomathon. That's not possible if I buy the game at a store.