To avoid damaging your wall, we need to look at the shelf and find out if it is nailed or screwed in. There is also the possibility that it is glued on. If that is the case we may not have any choice but to slightly damage the wall while removing the shelf.
Sometimes screw and nail holes are covered with timber filler. Have a look and see if you find circular holes that are slightly off colour and are circular. Once found remove the filler. If the shelf is screwed on use your screwdriver to remove the screws. If it is nailed on lightly tap the shelf with the hammer until it begins to move and sway. Once it is loose pull the shelf off.
If you find neither screw nor nail, then it is glued on. I recommend using Craftright 5-in-1 Scraper. Gently push the scraper between the timber shelf brackets at the bottom to separate the timber from the plasterboard. Use front to back and side to side motions to separate the shelf from the wall.
If the adhesive won’t budge, I suggest trying De-Solv-it 125ml Sticky Spot and Stain Remover. This has excellent adhesive-softening properties and might be strong enough to remove your shelf. Another product is Un-du 118ml Adhesive Remover. I find that the scraper that it comes with is quite handy. However, please be aware that some adhesive removers could stain your wall.
Once the shelf is removed, I suggest using Poly Wall Repair Kit to fill in the damage on the plaster wall.
If you have to touch up the wall and don't know the paint colour, I suggest getting a piece of the paint from the wall no smaller than a 10 cent coin. Bring this to the paint desk at the store and ask for a colour match in a Taubmans 250ml Sample Pot White. They will then match your wall colour using the sample that you brought. Here is a link to our Best Advice article : How do you match paint colours? - EricL