On Earth, we have a good reason to deploy electric devices with an "Earthing system": this helps to avoid dangerous leak currents on surfaces.
Now how is this solved on a spacecraft?
On Earth, we have a good reason to deploy electric devices with an "Earthing system": this helps to avoid dangerous leak currents on surfaces.
Now how is this solved on a spacecraft?
The frame of the spacecraft is used as a common ground. See this diagram from this handbook.
What PearsonArtPhoto said in the answer above, but also, if there is a need to ensure the vehicle is "grounded" relative to the plasma environment it's in (i.e., to prevent arcing or corona discharge), a plasma contactor is used.