If you wish to cut off outer parts of the outermost circles to form the square, you may create the circles, put the square on top, and Object>Clipping Mask>Make.
If you wish to merely place the circles in a certain way you may have a look at the Window>Align palette/panel options.
Thank you Jacob.
I need to align the circles within a shape evenly, not just evenly dispersed. If you look at the picture you can see that I have the blue rectangle on the left and a series of different sized circles on the right. I need the circles to be evenly spaced with in the rectangle to take the shape of a rectangle.
Just pour them in and shake it.
Or place one at a time.
In a case like this there are (almost) countless ways, and it is your decision which circles are placed together.
You may cheat a bit and make each circle a certain amount larger (equalling the desired distance between circles) than its final size, and make the rectangle larger by the same amount.
Then you may place the first circle, aligning it to the bottom and one of the sides of the rectangle, then the next one beside it, and so on, placing every new circle as well as possible, preferably touching at least two of the previous ones, keeping everything within the rectangle and filling it out as well as possible. After placing all of them, you may select all and shrink them using Effect>Path>Offset Path by a negative value equalling half the desired distance.
If you want the circles to have the desired size for real instead of as an effect, you may use Object>Path>Offset Path and delete the originals (every second in the Layers palette/panel).
1. Rectangle Tool: Draw the rectangle.
2. Object>Path>Split Into Grid...
3. Effects>Convert To Shape>Ellipse...
4. Object>Expand Appearance.
5. Object>Transform>Transform Each. Set both scale sliders to the same value. Turn on the Random checkbox.