Amazon (AMZN -1.64%) is an increasingly dominant force in retail. Not only did it account for nearly half of all online sales in the United States last year, it accounted for about 20% of all growth in U.S. retail sales both online and in stores.

Brick-and-mortar retailers are trying to fight back by improving their online sales channels, but those seeing the most success are leveraging their physical stores to offer better service to customers.

Here are three ways retailers can take on Amazon.

A miniature shopping cart with boxes in it on top of a laptop keyboard.

Image source: Getty Images.

Use physical stores for online orders

Walmart (WMT 1.32%) and Target (TGT -0.70%) efficiently leveraged their physical locations for online orders. Target stores fulfilled more than 70% of online orders in the last two months of 2017. Walmart has run several experiments to leverage its physical footprint for online order delivery, and it offers curbside pickup for online grocery orders at over 1,000 locations. It's also using Sam's Club locations as distribution centers and offering big discounts to customers that pick up orders in stores.

Using their built-in physical footprint to improve shipping speeds should be the focus of brick-and-mortar retailers. Amazon Prime offers two-day shipping on over 100 million items, so a Prime member shopping for something online is more likely to order from Amazon over a competitor all else being equal thanks to shipping speed. If brick-and-mortar retailers can offer similar shipping speeds at no additional cost, it could help bring back more customers.

Walmart and Target have made serious efforts to up their shipping speeds. Walmart offers free two-day shipping on a couple million items and Target offers two-day shipping on select items, with next-day shipping available on certain household goods for its REDcard users.

Position employees as experts

Some purchases can still use a helping hand. Someone buying a computer or TV from Best Buy, for example, might need help determining what exactly they need or where it would fit in their home. If you're working on a home improvement project, you might want help from someone who knows what they're doing with a nail gun or a table saw. And someone buying new makeup might want some advice about what works well with their skin.

Customers could spend time reading reviews and watching YouTube videos to figure out what's best for them, or they could go to an expert for personalized advice.

That's why Best Buy has free in-home consultations for things like entertainment centers and offers its Geek Squad to set up and install everything. Home Depot provides free workshops on the weekends, and its employees are positioned throughout the store to help you find the right tool for whatever job you're working on. Ulta Beauty (ULTA -2.08%) offers complimentary demonstrations to customers for how to do their makeup. 

These are services Amazon can't compete with. Positioning a store as a place to come for expert advice and the products you need is one of the best ways to stand out in an increasingly competitive retail environment.

Great customer loyalty programs

In the age of Amazon Prime, which offers Amazon customers unlimited two-day shipping, video and music streaming, free Kindle books, and access to a host of exclusive products and other benefits, competing retailers have to step up their shopper loyalty programs.

Ulta's Ultamate Rewards program offers free shipping and exclusive discounts for loyal, high-spending customers. Rewards members now account for more than 90% of all sales.

Target is testing a loyalty product called Target Red, which offers 1% back in rewards for a future purchase and a 50% discount on a Shipt membership for the first year (regularly $99). Target acquired Shipt last year. The service offers same-day shipping in 30 metro areas around the United States. Target Red members will also save the typical $5 shipping charge on Target Restock orders for next-day household goods.

Creating a loyalty program that's capable of competing with Amazon Prime is no easy task, but retailers that can give high-value customers extra perks stand to capture a larger share of the market.

Getting customers in the door

The important thing for brick-and-mortar retailers is to find ways to grow online and in stores. Leveraging their physical footprints to offer fast and low-cost shipping options to online customers, while providing in-store experts to make product recommendations, is key to both. Meanwhile, a strong loyalty program is essential to keep customers coming back instead of just going to Amazon or another competitor.

The companies mentioned in this article are doing a good job of at least one (if not all three) of these strategies and are worth taking a closer look at as investments. And these factors are something investors should keep in mind when evaluating a retail company's competitive advantages.