Somehow, a cheeseburger from The Habit just looks more appetizing than something you'd unwrap at McDonald's. Source: Shinya Suzuki, Flickr.

In the war between better-burger shops, Shake Shack (SHAK 0.34%) seems to win more than its share of accolades from the media. But astute investors may do better by avoiding the hype and looking more closely at rival The Habit Restaurants (HABT) to find the better investment opportunity.

Chew on this
Even in the face of soaring beef prices, burgers remain popular with consumers. The industry watchers at NPD Group say some 9 billion burgers were ordered up last year, a 3% increase from the year-ago period. By contrast, sales of the burger's primary competition, the grilled chicken sandwich, tumbled 9%.

But better burgers remain a niche business, generating just $3.5 billion in revenue in 2014 compared to $77 billion for burger restaurants as a whole in the U.S. Heck, McDonald's (NYSE: MCD) cooked up almost $6 billion in sales all by itself in just the first quarter of this year.

Yet McDonald's is suffering a crisis of confidence, due to the better-burger chains conspiring to siphon off customers (among other things). That means the better-burger chains are worth taking a closer look at.

Humble beginnings
Shake Shack's roots are found in of all things a hot dog cart that was set up to support the redevelopment of Manhattan's Madison Square Park in 2001. But today, what founder Danny Meyer once described as a "modern day 'roadside' burger stand," has transformed into a chain of 66 restaurants stretching around the globe, and generating $217 million in annual sales. Another 15 restaurants are expected to open this year.

Shake Shack has been stacking up customers as well as burgers ever since it got its start as a New York City hot dog stand. Source: Abdullah AlBargan, Flickr.

As phenomenal as Shake Shack's growth has been, The Habit has been better. And when you stack up the two side by side to see where they've been and where they're heading, it's apparent the real opportunity is with the less visible of the two chains.

The first Habit Burger Grill opened in 1969 in Santa Barbara, California, and it has since expanded to become a 113-restaurant chain. Over the next four years, it plans on doubling the number of restaurants operating and believes the market could support as many as 2,000 or more eventually.

Those might seem like grandiose plans, but so far, The Habit has managed its growth very well. It's been opening new restaurants at a compounded rate of 34% annually since 2011, but revenue has grown at an even faster pace of 44% annually.

Growth at a torrid pace
To put that in perspective, Shake Shack has also been opening stores at a prodigious pace, with its restaurant count rising 73% annually since 2010. But revenue has been growing at just 58% a year, meaning most of its revenue growth is a result of new store openings.

The Shack's original stores were in and around Manhattan, and therefore achieved extremely high sales volumes. However, as the chain expands globally -- even into fly-over country here at home -- average revenue per restaurant is falling. Moreover, the rate of growth at Shake Shack is slowing as well while The Habit is seeing its growth rate tick higher.

Data source: Company S-1 filings with the SEC.

Same-restaurant sales also started off impressively for Shake Shack, but they've since weakened considerably where The Habit's comp growth has risen sharply.

Data source: Company S-1 filings with SEC. Same restaurant sales figures from before 2012 were not available for Shake Shack.

When we compare their valuations, we see that The Habit is the better buy. While at $58 a share, Shake Shack remains well above its offering price, the stock has lost more than a third of its value after hitting nearly $100 a share back in May.

The Habit has also lost a little bit of its sheen. Its stock also trades well above its $18 a share IPO offer, and it's lost about 30% from the highs it hit immediately after going public. Yet while Shake Shack trades at over 16 times sales, The Habit sells for just four times sales. The former is still burning through cash, while the latter has finally turned free cash flow positive.

A cooling off period
Neither burger chain is a bargain-basement stock, and with the industry being saturated by new chains opening regularly, achieving the growth rates both have been accustomed to will be more difficult going forward.

But with investor interest in the space still high, shunning the stock that hogs the limelight while taking a closer look at the better-burger shop that stands in the shadows will likely yield a better result.