hello

click the rectangle
go to "Format menu" there's the option "align" in the "arrange ribbon icons"
click align below click the "snap to shape" also look at snap to grid.