Hold two 1/2-by-12-by-48-inch boards parallel to each other on their longer, thinner sides; you may need an assistant's help. Keep the boards about two feet apart, as these are the side boards of the pantry. Set a 1/2-by-12-by-24-inch board against one pair of the side board ends so that the edges of all three boards are even with one another.
Drill holes in this new board, which is the top board, spaced every 4 inches down into the side board. Drill four holes in each side board for a total of eight holes. Attach the three boards together by screwing 2-inch wood screws into each hole.
Repeat at the other end of the side boards using a 1-by-12-by-24-inch board. Consider this board the bottom board.
Put a 1/2-by-24-by-49-inch board on the frame, straighten the edges and drill holes around it, spacing them every 12 inches down into the frame boards. Attach this board, which is the rear board, to the frame boards using 2-inch wood screws.
Flip the pantry over and arrange a 1/2-by-13-by-24-inch plywood board and a 1/2-by-36-by-24-inch plywood board adjacent to each other over the frame. Position the smaller board at the top of the pantry and the larger board nearer the base. Slide two side-mount cabinet hinges between the smaller board and the side board of the pantry. Mark their screw hole locations, lifting the smaller board if necessary. Drill holes at each marking and fasten the hinges to the smaller board and the side board using 1/2-inch wood screws. Repeat with the larger board and three side-mount cabinet hinges.
Stand the pantry upright. Hold up a 1/2-by-12-by-23-inch board within the pantry at the intended position of a shelf. Mark where the shelf board touches each side board. Drill two holes into each side board at the marking level. Fill each hole with a peg. Set the shelf on the pegs. Repeat for each required shelf.