US group B&G Foods has entered into an agreement to acquire all-natural snack company Robert's American Gourmet Food, also known as Pirate Brands.