If the rear is shifting side to side, and steering the bike, that's likely swingarm pivot bushings. Any ovement lke that would do something to the shocks as a result.
The shocks do nothing to hold the swingarm in line. That's 100% the job of the pivot bushings.
Pinch the top and bottom row of the chan togetherat about the mid-point between the sprockets. Now, pull a link of the chain away from the rear sprocket at about 3:00 oclock. IF you can see daylight under the link its shot. If not, you an cut a few links out and keep using it.