What is the best way to: To attach the shelves to the back of the cabinet

--Make sure the shelves have a place to rest on and use a soldering iron to attach everything;
--Make sure the shelves have a place to rest on and use a nail gun to attach everything;
Answer:
Make sure the shelves have a place to rest on and use a nail gun to attach everything