For the want of a nail

I had my music cd,s rack hanging on the wall with nails.It came loose.
Time to go to Home Depot and find out what I could use instead of nails.They recommended the plastic screw drywall type.They come in diferent sizes and weights.If the item has some weight to it use at least 2 of them.