While some major companies are keeping their distance, Kmart's (NASDAQ:KMRT) first national advertising campaign since emerging from bankruptcy is featuring none other than Martha Stewart herself.

The lady the Washington Times dubbed "the fabled dominatrix of gracious living" is set to go to trial in January on charges of securities fraud and obstruction of justice. Her legal troubles have led to her being pilloried in the press and have fueled a 22% drop in the circulation of Martha Stewart Living magazine.

For the wounded Kmart -- a victim of falling same-store sales in the face of tough competition from the likes of Wal-Mart (NYSE:WMT) and Target (NYSE:TGT) -- the choice to stick with Martha makes sense. "We still continue to carry her product, a store spokesman told the Associated Press, "and it continues to sell very well. There has been no change there."

Perhaps Kmart management is paying more attention to the market's opinion of Martha than the media's. Martha Stewart Living Omnimedia (NYSE:MSO) is well off its lows and up 61% since David Gardner's selection in Motley Fool Stock Advisor last year (compared to the S&P 500's 25% rise).

Apparently, Kmart and the Street expect Martha to emerge from her trial in much better shape -- and with much greater credibility -- than many think.