Typically the +5vdc and ground input is to supply the power needed to operate the input stages of the optoisolators and as such should be wired to the arduino ground and 5v pin. Then you can wire the relay channel input pins to arduino output pins and most likely a digitalWrite LOW will activate the relay and a digitalWrite HIGH will turn the relay off. The 2 pin connector to the right is for an independent +12vdc (and ground) power source to operate the optoisolators output stages and the relay coil circuits.
The fact that you want to drive this board with a shift register will complicate it some, but certainly possible. Most likely whatever you wire to the channel input pins will probably be required to be able sink 20ma of current in the LOW state, which many shift registers cannot do without additional transistor output components. Are you sure you don't have enough pins on a mega board to operate these relays directly? You do know that you can use the 16 analog input pins as digital output pins if you wish?
Lefty