I shop all the time online, and have so for years. Online retailers save overhead costs in not having brick-and-mortar stores, so they are able to offer lower prices than stores do. And as others have said, many online retailers offer free shipping if you buy above a certain dollar amount (eg, with Amazon it's $25), or low shipping rates.
If you know what product you want to buy, use Google Product Search
to find which online retailer sells the product for the best price.
About credit card security: online retailers use anti-theft protections. If the URL of the web page where you enter your credit card number begins with "https", then a secure link is being used. They are very secure. When you use a credit card at a retail store, your card is no more and no less vulnerable to identity theft.