Use outlets that have a good online reputation and have been trading for some time.
Your entitlement to a refund or redress for a illegal product is different depending on whether you buy from Amazon itself or a third-party seller working with Amazon. After the report of pirated / illegal Microsoft Office from an Amazon retailer (and Amazon’s initial refusal to act) how can you protect yourself from a similar problem on Amazon or other sites?