Extension and integral representation of the finite Hilbert transform in rearrangement invariant spaces