What do you do if you're a slow-growing retailer, with plenty of cash on the balance sheet and solid cash flows, but your stock is hitting two-year lows? Buy back shares, of course!

That's the conventional wisdom these days in the world of capital structure, and RadioShack (NYSE:RSH) yesterday decided to go for the gusto in a big way. The company announced that it purchased $500 million of its shares overnight from Bank of America (NYSE:BAC) for just about $25 per share. That's a big one-night event for a company that has averaged $250 million to $300 million in share repurchases annually over the past few years. It brings the company's share repurchases this year alone to $625 million, and the company says that's all it will buy in 2005.

The deal has Bank of America buying RadioShack shares in the open market over the next four to six months, with the two companies settling up over any price differences at the end of the program. The sweetener for RadioShack is that the electronics retailer has limited its exposure in the event of a large share-price increase during the program. The details regarding its exposure, however, were not disclosed.

Predictably, this move prompted the major credit rating agencies to respond immediately. The rating agencies think any excess cash flow should go to paying down debt; they hate repurchases. But that's not a surprising point of view when you consider that their sole purpose is to evaluate a company's ability to support its borrowings. As a result, Standard & Poor's quickly downgraded Radio Shack's debt one notch from A- to BBB+. Moody's and Fitch settled for a change of outlook from stable to negative.

While the downgrade may marginally increase RadioShack's cost of borrowing, it's not likely to cause a significant problem. The company expects to finance $200 million of the buyback through a sale/leaseback of its new corporate headquarters. The company also reaffirmed its current forecast of $1.80 to $1.90 in earnings per share for the current year, although the share repurchase is expected to be "modestly accretive."

What I like about this move is RadioShack's decisiveness. To be sure, the company has fallen on some hard times this year, with same-store sales turning slightly negative and EPS for the first six months down 18% over the prior year. But think of it as an opportunity! The stock dropped below $25 a few weeks ago. Why not put some of that cash flow to good use, and to heck with what the rating agencies think?

Time will tell whether the stock is truly undervalued. I haven't seen any news to indicate that sales are improving, but at the very least, we know Bank of America will be buying shares over the next few months. Stay tuned for further developments.

For more Radio Shack happenings, check out:

Fool contributor Timothy M. Otte surveys the retail scene from Atlanta. He doesn't own shares of any company mentioned in this article.