Coins are accumulated through winning battles or clearing songs in Freestyle mode.
However, this achievement doesn't progress based on how much you accumulate, but how much you currently have on hand. That said, it's best to aim for this achievement first before spending on anything in the shops.