Yes, it's springs that set ride height, but if you match the shocks with a spring of the wrong length, it can (allegedly) cause premature shock wear.
I bought these this year for my e86 with sport suspension. Was the best 'oe' I could find, this side of BMW
https://m.autodoc.co.uk/bilstein/631791