what are those two 5V and two GND pins for?
The board takes a 12v input and produces a 5v output, for the optocouplers: the relays / drivers / leds run off the 12v source.
The 5v pins are routed out, to potentially power other peripherals.
The inputs are "isolated" by the opto-couplers (active low) and you should have no problem driving them with a shift register: the "isolation" however shares the same 5v, according to the schematic.
These "schematics" are not schematics. These as PCB files.
One of the files is a schematic for the board.