Image source: Getty Images.

What happened

Shares of Best Buy (BBY 0.20%) gained 14.5% in August, according to data from S&P Global Market Intelligence. The retailer surged as much as 17.5% higher in a single day, thanks to a great second-quarter report.

So what

Best Buy delivered 16% earnings growth and flat year-over-year revenue, while Wall Street expected shrinkage on both the top and bottom lines. Comparable sales increased 0.8%, and online sales rose 24% higher.

The company hasn't missed an earnings target since 2012. Share prices have gained a total of 26% in 2016, matched with a generous 2.7% dividend yield.

Now what

The raging growth in online sales was not powered by any particular product category. Instead, management tipped their hats to a better operating model. Recent improvements included a redesigned web experience with snappier checkouts and better product search tools. The new product recommendation functions also tie the online experience closer to Best Buy's store network.

It's cool (and rare) to see an old-line retailer doing well in this era of online shopping. If you can't beat 'em, you gotta join 'em -- and Best Buy is doing its best to turn its bricks-and-mortar store into a valuable asset.