I personally think cleats are best as they can take the weight and due to continiouse nature..tou always get studs to attach to. Just put a board on each end and the back on the wall and place shelf to rest on lip created. There are alwats plenty of bracket options to
Anita However you mount your shelves I wouldn't use boards unless you absolutely have to. I would use the wire shelves you can by at any home improvement store. I have wooden shelves in my walk in closet and they look nice but there is always a dusting problem and things tend to leave marks where they set for any length of time.
We used brackets with mounting hardware and my dear dad cut plywood to fit the width and then sealed it with paint and polyurethane and let it dry for a few days. Dad was a fuss-budget when it came to secure solutions so he used a stud finder and made sure the mounting strips were screwed into a stud. Check the shelving aisle at Lowes or Home Depot. I was in that house for 10 years and that closet held a lot of my quilting fabric, never had a problem.
If you really want inexpensive and secure, it depends on what you have on hand. Wire shelves and their mounting hardware make for an easy project, but they run into money and things will fall through the shelves. Your other alternatives are
1.) wood cleats nailed into the sides and back of the closet, and placing boards across them. Secure but not adjustable.
2.) L-shaped metal brackets, with boards that can either be attached or just resting upon them. Again, study but not adjustable. The brackets are fairly inexpensive.
3.) wall-mount shelf standards with brackets to hold up the shelves. These are slightly more pricey, but have the benefit of being adjustable.
4.) wooden board uprights in pairs on both sides of the closet space. You would insert shelf pins into matching sets of holes, drilled at even spacing, on both sides. (Making a jig or using a bought template really helps.) You then rest your shelves upon them. Relatively cheap, and very adjustable.
I've used all of these systems, and favor cleats for fixed shelves, and shelf pins for adjustable ones. It's your call!
Depending on the shelving you purchased I would you end brackets and if they are long would add a middle bracket.
If you are going to use wood shelves then wood cleats I feel are best, but depending on the length of the shelf and what is going to be stored on it, you may want to add a support bracket. If you want to go with wire shelving, please don't purchase Closet Maid for the quality of the product is cheap in comparison to Elfa Shelving sold by "The Container Store", they also provide free designers to help you to maximize your closets based on the purpose, and I personally have used the Elfa Shelving in all of my closets.
Remember to check with Habitat for Humanity if you have one they may have some on hand. I love Ikea but what ever suits your needs.