Check the company out. Only do business with companies that provide a physical address and a phone number. If you're suspicious, trust your gut feelings. A reputable company will be pleased to provide you with lots of references. Ask the company what will happen if you want to return the product or service.
Most reputable companies offer strong guarantees and stand behind their products, especially online.
Keep good records. Always print out a copy of any online products or services you purchase. Be careful, but don't be paranoid. After all, most businesses on the Web are legitimate. Use good judgment, be careful, follow these tips, and you probably won't have any problems.