If you would rather not purchase a bin for your compost pile, you should still devise a way to contain it. You can easily and inexpensively build your own bin. This will give you more control over the size of the pile and can prevent unwelcome animals helping themselves to some free food.
If you are using recycled lumber and it has been treated (either painted or stained) make sure it has been done using non-toxic material. You do not want anything toxic or poisonous to come in contact with your compost, especially if you are going to be using it where you are growing food.
You will need four 4-foot sections of 2X4 and 20 3-foot sections of 1X6 boards. Begin by hammering the 2X4 lumber pieces into the ground with a sledgehammer at the corners of what will become a 3 feet squared container (space each corner post 3 feet apart).
Next, put five boards to every side securing each end of the board to the corner post with nails. Be sure to leave enough room in between each board for air circulation. You can use a piece of plywood or another flat piece of material large enough to cover the top as a cover.
Another way to build your own bin is to use new or recycled pallets. Find wooden pallets (you may be able to find them at a land fill site) and nail or screw them together to form a square. If you want you can add a fifth to give the bin a bottom, but this is not necessary.
Another option is to enclose the pile with a wire mesh. You can either create a circle with the mesh and secure with metal ties or hammer wooden posts in a circle around the pile and secure the mesh to the wooden posts.