how does a shock work