In recent months, the stock market action has put many investors through the ringer. Many of you out there are now looking for a place to invest while still being able to sleep at night.

One place to look at when playing defense in the stock market is the food business. After all, we all need to eat, right? With that in mind, we know that revenues should be stable in this area. So, the real work is looking for food stocks that will outperform.

One thing to keep in mind is that defensive industries have relatively low growth rates and profit margins, which means highly competitive situations for companies in those industries. The food business is no exception. The recession, high employment and food price deflation have fostered a promotional environment for food manufacturers.

Put simply, food companies are lowering prices in an effort to gain market share. This puts further pressure on profit margins. But, this isn’t all bad for investors—as long as you are looking for those companies that are taking market share.

A great place to start is with Zacks Investment Research. I used our Research Wizard to find food stocks with a Zacks Rank of #1 or #2. Those are the companies that have been beating earnings estimates and raising guidance. In other words, I wanted to find food companies that were performing best in this difficult environment because those companies will do even better when the economy finally breaks away from its current malaise, leaving the weaker players in the dust.

Below are four food stocks that we think are in a position to gain share and provide steady revenue and earnings, even if industry conditions remain difficult and the economic backdrop remains choppy.

Del Monte Foods (DLM)

Del Monte Foods produces, distributes, and markets branded food and pet products for the retail market in the U.S. Its Consumer Products segment sells branded and private label shelf-stable products, including fruit, vegetable and tuna products. The Pet Products segment offers branded and private label dry and wet pet food, as well as pet snacks.

The company’s plan to boost sales and earnings growth is on track. Del Monte’s reorganization efforts included a shift in its sales mix to higher growth and higher profit margin products: snacks and pet food. Those efforts also produced impressive productivity gains. In addition, the company showed investors that it will be returning value to shareholders. It recently announced that it was going to increase its dividend by 80% and buy back up to $350 million of its shares over the next three years.

For its fiscal fourth quarter, Del Monte reported $0.31 per share, topping the Zacks Consensus by 9 cents, or 40.9%. In the last three quarters, Del Mont has beaten the Zacks Consensus by an average of 58.1%.

In the last month, the Zacks Consensus Estimate for fiscal 2011 is up 10 cents, or 7.6%, to $1.41, and the Zacks Consensus for fiscal 20121 is higher by 9 cents, or 6.3%, to $1.53.

Del Monte is a Zacks #1 Rank stock with a dividend yield of 1.4%. It is trading at 10.6x fiscal 2011 consensus EPS estimates and 9.8x fiscal 2012 consensus estimates.

Hormel Foods (HRL)

Hormel Foods produces and markets various meat and food products in the U.S. and Internationally. It offers meat products, including fresh, frozen, cured, smoked, cooked and canned meat. The company provides perishable meat products, which include fresh meats, sausages, hams, wieners and bacon; and shelf-stable products such as lunch meats, chili, hash and stews.

The company has a balanced portfolio of grocery products, refrigerated foods and Jennie-O Turkey. By not relying on one product line, the company is able to better manage its business. Hormel’s refrigerated foods and Jennie-O Turkey sales are performing well, with Jennie-O’s operating profits climbing 93% year-over-year. Growth in those segments more than offsets Hormel’s grocery business, where its Spam and Bacon Bits products are dealing with higher input costs.

Hormel reported fiscal second-quarter EPS of $0.67, beating the Zacks Consensus Estimate by 6 cents, or 9.8%. In the last five quarters, the company has beaten the Zacks Consensus by an average of 14.3%.

In the last two months, the Zacks Consensus Estimate for 2010 has climbed 8 cents, or 2.9%, to $2.82. The Zacks Consensus Estimate for 2011 has increased 9 cents, or 3.1%, to $2.98.

Hormel is a Zacks #2 Rank stock with a dividend yield of 2.0%. The stock trades at 14.8x fiscal 2010 consensus EPS estimates and 14.1x fiscal 2011 consensus EPS estimates.

J&J Snack Foods (JJSF)

J&J Snack Foods manufactures nutritional snack foods and distributes frozen beverages to food service companies and retail supermarkets in North America. The company primarily offers soft pretzels, frozen juice treats, desserts, churros and baked goods to snack bars and food stands.

JJSF’s frozen carbonated beverages (FCB) and soft pretzels are driving the company’s solid growth. FCB is a high margin business that is experiencing solid momentum. Meanwhile, soft pretzels, which suffered in recent quarters because of price increases, appears to have stabilized, and there has been an uptick in its sales to malls, theme parks and sporting events.

J&J Snack Foods’ fiscal Q2 earnings per share beat the Zacks Consensus by 2 cents, or 4.4%. In the last five quarters, JJSF has beaten consensus estimates by an average of 25.6%. In the last two months, the Zacks Consensus Estimate of fiscal years 2010 and 2011 have remained essentially unchanged.

J&J Snack Foods is a Zacks #2 Rank stock with a dividend yield of 1.0%. JJSF shares trade at 17.1x fiscal 2010 consensus EPS estimates and 15.8x fiscal 2011 consensus EPS estimates.

Treehouse Foods (THS)

TreeHouse Foods operates as a private-label food manufacturer serving the retail grocery and foodservice channels in the U.S. and Canada. The company’s products include non-dairy powdered creamer, soups, broths, infant feeding products, salad dressings and jams. Its brands include Peter Piper, Hoffman House and Nature’s Goodness.

Private-label is a large but fragmented industry. It generates over $60 billion in annual sales, and over 80% of the companies in the business are small, privately-held firms. This gives Treehouse, which has been a consolidator in this space, the opportunity to produce solid and consistent earnings growth for the next several years. In the last five years, THS has acquired four companies and plans to continue its growth-by-acquisition strategy in the future.

In Q1, Treehouse earned $0.59 per share, ahead of the Zacks Consensus of $0.51. In the last five quarters, Treehouse has beaten the Zacks Consensus by an average of 18.9%.

In the last two months, the Zacks Consensus Estimate for 2010 is up 3 cents to $2.72, and the 2011 Zacks Consensus is up 3 cents to $3.06.

Treehouse Foods is a Zacks #2 Rank stock that trades at 17.2x 2010 consensus EPS estimates and 15.3x 2011 consensus EPS estimates.Zacks Investment Research