Controlling OnOff SHIM with NPN transistor



I’d like to use the OnOff SHIM in conjunction with an Arduino, to automate the switching on and off of a Pi Zero. I figured an NPN transistor is the right way to go. My question is, would I need to create a common ground between the Pi and the Arduino?

Thanks in advance,