US convenience store chain The Pantry has signed an agreement to acquire 40 convenience stores.