That's not necessary.
Here's the Spike manual; it's got the correct method using the relay outputs.
Or do you have a reason to want to connect two separate digital I/Os, instead of the relay outputs?
A fuller description might also allow us to suggest some other options.