Both use the underlying stack:
gnome-session, g-c-c, network and modem manager, etc.
And both follow the gnome design patterns for mobile.
But the shell's themselves, gnome-shell and phosh are different, phosh is written in gtk and gnome-shell is not.
So sharing code between the two shells is hard.