Select the shapes.
Click the Format tab under Drawing or Text Box Tools.
Then click the Align button
Then click Grid Settings.
Select the Snap objects to other objects check box.
Select the Snap objects to grid when the gridlines are not displayed check box.