The shareholders signed an agreement on the deal. The combined network will include more than 5,000 stores.