you only need the shocks, which go inside the strut. the actual strut housing doesnt need to be replaced. although companies like H&R and Bilstein(i think) give you everything when you buy their shocks, or cupkit. If you ever want to lower your car or just want a slightly stiffer ride for better handling then buying sport shocks would be your best bet, such as Koni sport adjustable shocks, Bilstein HD's(for stock height) or Bilstein Sports(for lowered ride height). If you just want a replacement, then Bilstein tourings is the best shock for the money.
BMW's only have struts in the front, but it is better to replace all the shocks at once, especially if your upgrading. They can be as cheap as >300 (for Bilstein Tourings) or as high as $500 (for Koni adjustable shocks).
If you really crave more performance, especially in handling, then its best not to take the cheap route when buying shocks. The koni's adjustability is a huge plus because you can set them for firm damping (for spirited driving or auto-x) or set them for soft daily driving with just the turn of knob. There are other adjustable brands, but koni is the best all around.