Shares of Staples (NASDAQ:SPLS) were pounded last week, finishing down by more than 15%. To put that in perspective, it was the worst performance on the S&P 500 (SNPINDEX:^GSPC) by nearly 10%.

The reason for the fall was simple. On Thursday, the office supply retailer said it will close 225 stores over the next two years. That equates to roughly 12% of its North American locations.

On top of this, its fourth quarter and full-year results for 2013 were dismal. Same-store sales were off by 7% compared to 2012 (if you exclude the 53rd week in 2013, they were 4% lower), and top-line revenue dropped by 10.6% (excluding the extra week, the measure was down 3.8%).

"We're certainly not happy with our fourth quarter results," said CEO Ronald Sargent. "Our customers are using less office supplies, they're shopping less often in our stores and more online, and the focus on value has made the marketplace even more competitive."

SPLS Total Return Price Chart

SPLS Total Return Price data by YCharts

You can see the impact of this on Staples' long-run stock chart. Since peaking at the end of 1998, it's off by 75%. On a dividend and split-adjusted basis, it's 32.6% lower.

What's the answer to Staples' travails? While the market's reaction on Thursday doesn't imply it -- that's when the majority of the week's decline took place -- the retailer is taking the appropriate measures.

Roughly half of its sales come from, and, as the above announcement makes clear, it's steadily reducing its bricks-and-mortar presence. In short, this is the only viable way to survive and perhaps even thrive in the e-commerce era.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.