Rear shock mounting bolt/mounting breaks

If a shock mounting bolt or pivot bolt breaks, it is very possible to damage the bike as the swing arm and pivots are now not constrained to their normal range of motion. You are unlikely to find a strong enough natural item on the trail side to replace a mounting bolt, and they are typically hardened bolts in specialist sizes that are not carried by hardware stores.

In this situation, it’s best to push a stick through the hole where the bolt was to hold the pieces in place, and then carry or push the bike. You could try threading an Allen wrench or screwdriver through the hole and securing it in place, but you risk expensive damage to the frame and the shock if the object you use rubs the bolt hole oval or burrs threads.