Two companies were fined for safety failings that led to two workers being seriously injured at a construction site when a cold store collapsed under them.