Ralcorp Holdings has signed a definitive agreement to purchase Cottage Bakery, a manufacturer of frozen par-baked breads and frozen dough sold to retail and foodservice customers.