So if I use the board idea then in my mind I would have to have three pieces of board. One for the back of the closet and one on each side. When I figure out where the studs are in the wall do I just use something to measure where they are to put marks on the wood? Also, is it possible for one of these walls not to have a stud at all? If that is the case then would a peice of wood on that side of the closet even make sense?
Depending on the size of your wire shelf, you may not have room to put boards on the side of the shelf. As far as the back board, locate the studs in the back wall and mark them on the wall. Hold the board on the wall where it will go and transfer the marks from the wall to the board. While you are at the home center getting the boards, get a countersink bit for your drill and drill a countersink hole at each place where you are going to screw into the studs. Also get a few screws that will be long enough to go through the board (3/4"), the drywall (1/2") and well into the stud. So, to attach the board to the wall, you'd need a few screws that are around 2" long. I normally use drywall screws for this. You should be able to use the screws that came from the anchors to screw the wire rack into the board.
If you do have room on each side to put a board, Remember, there's always a stud at the corner and generally one 16" out from there. If that is your situation, cut the side board 17" long, put a screw in the corner and one in the stud then attach your wire shelf to the board. If there isn't room, you can use an anchor on the side of the shelf.