CS5 Create a shape. Double click on the layer to bring up the blending options. Choose stroke>styles. Pick a dotted line that you likeThis works best for boxes and rectangles but it can work for other shapes too.
Create a new layer for your shape. If one of the shape tools will give you the shape you need, choose it.
Select the fill pixels button in the Shape Options on the Shapes Toolbar. I use a white fill because it is easy to remove.
Create a shape.
Double click on the Shape Layer on the Layers Panel to bring up Blending Options.
Click the Stroke check box. Double click on the word Stroke next to the box you just checked to get the Structure and Fill Type boxes.
Choose Fill Type Color and choose your color.
Click on Styles at the top left. Pick a dotted line that you like. I like the 4th one from the top left.
If you go back to strokes and click twice you'll get the Structure and Fill type boxes. Hold down the left click on your mouse over the shape and you can move the pattern around to improve the border. Play with Scale, Size and opacity to find a design you like.