Make sure there is a connection point at a common point on the two shapes, say, the bottom right corner of one shape, and bottom left of another shape. Best use the shapesheet for this - set the connection point Type = 2.
Now you'll be able to join and glue either shape to the other using those connection points.