Wal-Mart (WMT 0.09%) and Target (TGT 0.56%) have recently begun to make major changes to their brands.

The two retail giants are trying to transform their physical stores to better align with a customer base that's increasingly thinking digital first. It's a massive shift and both companies have different angles on tackling the problem.

Deciding which stock is a better buy largely depends on whether you believe either has a chance to make the transformation. Both want to increase the use of their stores for pickups of online orders, returns, and, in many cases, as shipping points to facilitate faster delivery.

Neither chain faces an easy road and both bump up against the giant shadow of Amazon (AMZN 3.37%). This is a long-term battle that won't play out quickly, but one of them seems to have an edge.

WMT Chart

Image source: YCharts.

The case for Target

Target stock has been going in the wrong direction for the past few months. That fall was caused by the company's disappointing holiday sales numbers, with same-store sales slumping by 1.5%. That overshadowed news in the chain's Q4 earnings report that comparable digital sales rose by 34% and store traffic was actually up slightly (0.2%).

As with most retailers that turned in disappointing holiday sales, Target's stock price also tumbled. In my opinion, investors were more worried about the long-term prospects for physical retailers, though, than about Target's numbers.

Going forward, however, the chain has what it called its "ambitious store redesign to date" in a press release, which quoted remarks CEO Brian Cornell made at the recent ShopTalk show in Las Vegas.

"With our next generation of store design, we're investing to take the Target shopping experience to the next level by offering more elevated product presentations and a number of time-saving features," said Cornell. "The new design for this Houston store will provide the vision for the 500 reimagined stores planned for 2018 and 2019, with the goal of taking a customized approach to creating an enhanced shopping experience."

The new stores will feature two entrances. One will be optimized to serve online customers picking up orders or making returns as well as people looking to quickly buy items for immediate use. The second will focus on fashion and exclusive Target lines.

It's a bold change designed to embrace the idea that customers still need stores for some things -- buying a snack online is not useful if you are hungry now, for example -- but want to see digital and physical experiences that complement one another. As part of its transformation, Target is also opening smaller-format stores in city markets where its full-size locations were impractical.

A package rolls down a shipping line at a Wal-Mart warehouse

Wall-Mart has been growing its shipping capacity. Image source: Wal-Mart.

The case for Wal-Mart

Wal-Mart is doing many of the same things as Target to make its stores support its digital sales. It has gone a step further, however, in growing its online operations by spending $3.3 billion to buy Jet.com and then putting its CEO, Marc Lore, in charge of its entire digital operation.

That's a bold step, one that brings a different type of thinking to a traditional company. Lore has already shaken things up by eliminating Wal-Mart's $50 program that offered unlimited two-day shipping as an answer to Amazon Prime. Lore saw Amazon's lead and changed the program to offer free two-day shipping on any order of eligible items over $35.

It's too early to know how that change will work, but Wal-Mart did post U.S. e-commerce growth of 29% in Q4. CEO Doug McMillion spoke abut those efforts in the company's earnings release. "We're moving with speed to become more of a digital enterprise and better serve customers," he said.

Which is the better buy?

While Target may also be successful, Lore's presence gives Wal-Mart, already the No. 2 online retailer in the U.S., an edge. Taking on Amazon is not easy for any company, but Wal-Mart's low prices and differentiated customer base give it a better chance.

In a difficult retail market, both retailers are making smart moves to adapt to changing consumer behavior. Target and Wal-Mart understand that stores will have to be integrated into the digital experience for returns, pickups, and shipping. Exactly how well that will work remains to be seen.

Wal-Mart has been the bolder of the two companies and that's what's needed to take on a rival like Amazon. Target's place -- and you can see it embracing it with the plan to go into city markets with smaller stores and its efforts to offer hip, exclusive fashion lines -- is to serve a more niche role. That may result in a solid business, but Wal-Mart's going after a bigger potential audience and Lore appears to be the one to help the company reach it.