Convert to Shape
There are many times where I create a rectangle and realize I wanted a rounded rectangle, or vice-versa. An easy way to remedy that is to apply an effect. With a shape selected, choose Effect > Convert To Shape > choose a shape. You can always choose the type of shape in the Shape Options dialog box that appears.
If you want the new shape to be the same size (say you choose to convert a rectangle to a rounded rectangle), select Relative for Size and set the Extra Width and Extra Height to 0 (see Figure 12).
Figure 12 Change a rectangle to a rounded rectangle