Shimming windows into a wall is not done just any which way. The better of the window manufacturers will provide a shimming schedule with every window, specifying exactly where the shims should go.
On the bottom the shims should go under vertical structural parts of the window to carry the weight. Shimming just in the middle of the window could put a lot of pressure on the glass, or warp the frame.
On the sides you do not put the shims next to the horizontal structural members. Rather they go about six inches above and below the horizontal parts of the window frame. This will allow for minor expansion and contraction on the part of these horizontal members. If they were shimmed in tightly and then tried to expand, they would bow up, perhaps even breaking the glass.
If there are hinges on the window, the shims should go very close if not directly behind the hinges. This will transfer the hinge load over to the house framing and take stress off of the window frame.
No top shimps
The top of the window has no shims at all. If you want to put in screws in the top, they go vertically up so that if the house framing wants to settle a bit down towards the window, like with a heavy snow load, the screw will slide in the window frame and the pressure will not reach the window itself.
When you shim, always use two shims in opposite directions so that they create parallel faces. Some people just put them in from one side and the result is that the shim actually only touches the window frame on the very edge of the frame, not giving adequate support. This can lead to distortion of the frame and loss of the seal in a thermal pane picture window. This double shimming is easy to do with a window who's frame is open on both the inside and outside.
If you have brick molding on the outside of the window, you have to put the fat end of one shim into the space first and then put in the thin end to tighten it up. You will often have to cut the length of the small one several times before you reach the proper thickness.
Rough opening size
Oh yes, in case I didn't mention it. The rough frame is made one inch larger than the window itself, giving you about half an inch of shimming space all around.