I have created a rectangle shape inside which i have created several other shapes. I want to select one of these shapes, but as soon as I start drawing a marquee around this shape the rectangle moves and i am not able to select the object inside the rectangle.
There are several ways around it.
1) Inside layers panel, create new layer on top of the layer with your rectangle (which is going to be a backgdound, I presume) and then lock the layer containing the rectangle you wish to "avoid".
2) While your rectangle is selected press Ctrl + 2 (not F2, but number 2) this will "lock" anything you have selected currently and thus you won't be able to manipulate those objects. To "unlock" use combination of of Ctrl + Alt + 2.
Hope this helps!