Pinnacle grew or held share in eight out of 13 categories during the second quarter.

PARSIPPANY, N.J. — Pinnacle Foods, Inc. is rebounding from the six-week “distraction” of the proposed merger agreement with Hillshire Brands Co. that was terminated when Tyson Foods, Inc. agreed to acquire Hillshire at the end of June. Although the debacle led to a loss in productivity for Pinnacle in customer planning and acquisitions, the company ended its second quarter with higher earnings and sales, even against the added challenges of a tough retail environment.

“After the interesting events of the past quarter it is a pleasure to be fully focused on realizing the opportunities we have in front of us at Pinnacle,” said Bob Gamgort, chief executive officer, during an Aug. 13 conference call with financial analysts to discuss second-quarter performance. “Our business model has proven to be quite resilient in the face of increasingly difficult industry dynamics. While we are not immune to the challenges, we continue to execute well, driving volume and market share growth as well as improved product mix and strong productivity.”

A bright spot in the Hillshire saga was its brevity. The unsolicited offer came and went within six weeks, too short a time span for the company to lose any key executives, Mr. Gamgort said.

“So, while it’s great that it only lasted six weeks, in this environment I don’t want six hours of distraction, let alone six weeks of distraction,” he said. “So I think it’s a really good indication of how solid our team is that we have been able to rally and deliver strong performance.”

Pinnacle also benefited from a $163 million termination fee from Tyson Foods that was used toward a $200 million reduction in debt as well as retention and performance incentives for all of its employees.

How the Hillshire deal unfolded underscores the state of the food and beverage industry and how companies may retain growth in the face of ongoing challenges, Mr. Gamgort said.

“The lessons learned on this — the environment is ripe for consolidation in the food industry,” he said. “A combination of lack of growth, relatively low-cost financing, no easy answer to where you go next, emerging markets aren’t delivering the performance they once did. Even some of the specialty retailers are soft on their performance, so it’s not such an easy answer. Then when you get right down to it and you see pressure from activists on some other companies, consolidation makes a ton of sense.”

The terminated agreement also strengthened Pinnacle’s confidence in its business model and plans going forward.

“I think what surprised us is that we felt we were going to be the consolidators, and that’s why it was unexpected,” Mr. Gamgort said. “We will go back on that front and continue to be consolidators. I think the lesson learned internally, and we’ve had a lot of discussion here, we like the business model that we have created. We like the culture and the environment of this company. We’ve just got to keep dialing up the speed and continue the aggressive posture that we take on costs, on innovation, as well as M.&A. And I think that was the takeaway from all of us.”

For the second quarter ended June 29, Pinnacle earned $35,584,000, equal to 31c per share on the common stock, which compared with a loss of $31,839,000 in the prior-year period. Excluding items affecting comparability, net earnings increased approximately 23%.

Net sales totaled $617,800,000, up 8.6% from $569,044,000 in the comparable quarter, reflecting the benefit from the company’s acquisition of Wish-Bone dressings.