It's really confusing at first and I think the shop is bugged ? (I had to start over anytime).
But I think there is some really good ideas !
The shop seems to be working properly for me. Every time you die, all the enemies are removed from play and you go to the shop. The shop presents you with a number of cards to buy, most of them are better than the base cards. You are also presented with a selection of your current cards which you remove. The deck should be persisting between every death/shop visit (but not if you refresh the browser, unfortunately).