I am by no means the expert on this, but here goes...
When I feel the urge to shop, and online shopping makes it easier and therefore that much more dangerous, is that I put the stuff I want into my shopping cart and let it sit there, or remove it and save it for later. I try to look for things around my house that I can use, because I went through a period where I was spending so much money on things that I couldn't remember what I bought by the time it was delivered to my house. So chances are, I already have what I was looking to buy anyway. Having to rely on cash or debit instead of credit helps. I have to make a grocery list and stick to it religiously so that I don't buy junk food. I've had to dial down my expectations and buy cheaper brands of clothing and personal care items instead of "status" items. I can really rein it in when I have to. But I struggle with shopping as maybe not so much an addiction, but a way to deal with my anxiety.