RadioShack ( RSH) swung to a stronger-than-expected third-quarter profit, as cost cuts and margin improvements offset a continued sales decline.Shares soared $2.74, or 14%, to $22.36 in early trading Monday. The Fort Worth, Texas-based electronics seller posted third-quarter earnings of $46.3 million, or 34 cents a share, compared with a year-earlier loss of $16.3 million, or 12 cents a share. Analysts polled by Thomson Financial expected earnings of 26 cents a share. The company's sales fell to $960.3 million from $ 1.06 billion a year earlier, worse than analysts' target of $989.8 million. Same-store sales, or sales at stores open at least a year, dropped 8.6%. RadioShack has been struggling to attract customers amid competition from big-box retailers like Best Buy ( BBY) and discounters like Wal-Mart ( WMT). In particular, the company has been hit by weakness in its postpaid wireless phone business for Sprint ( S) customers. The postpaid wireless business continued to have trouble in the third quarter, RadioShack said, partially offsetting a strong performance in sales of prepaid wireless phones and global positioning systems. "We continue to face challenges at the top line in our business, mainly as a result of well publicized developments in post-paid wireless related to Sprint," said Chairman and CEO Julian Day. "We are addressing those challenges energetically and hope that having configured the business for increased profitability, we will now prove successful in configuring it for growth." Day, viewed as a turnaround artist, took the helm at RadioShack last year and has since been focused on cutting costs. In the third quarter, the company's gross margin increased to 51% from 46.1% the prior year, an improvement RadioShack attributed to inventory management and a more profitable product mix. The company's selling, general and administrative expenses fell 13%. For the fourth quarter, RadioShack offered a relatively cautious outlook but said it still expects improved results. "As a result of adverse developments in the economy, we anticipate that the trading environment in the fourth quarter will be challenging in terms of both absolute demand as well as the competitive landscape," said Chief Financial Officer Jim Gooch. "Despite this, we currently expect to produce an improvement in net income this fourth quarter when compared to the fourth quarter of 2006."