Help needed with a circuit driving magnets

The last guy why tried a higher motor voltage blew up all the 16volt electrolytic caps.

Just replace them with 40volt or 64volt types, and you're good to go.
Don't try to power the Arduino through the shield a that voltage (remove the jumper).

But why a (bi-directional) motor shield for a (uni-directional) solenoid.
Mosfets, or a TPIC6B595 shift register could be a better choice.
Can parallel two TPIC outputs for higher current capability.
Leo..