It will only work with the headlamps on. Have you tried this?
The bulb holder is not great either so it could be a failed bulb or a failed earth. The fact that the brake lights work doesn't mean that there might not be a fault of the fog light earth. It could be inside the holder.