Will removing shelving screws from studs damage the studs?
As long as they are normal screws and you unscrew them they won't compromise the studs or their integrity. If you rip the screws out (with a hammer for example) that could compromise the studs.

If you plan on reusing the exact same holes there are things you can do to help future screws grip just as well by adding toothpicks to the holes, but otherwise you don't need to worry.