Yes the cordless Waterpik can be used in the shower.
You can use the cordless Waterpik in the shower and get it wet without worry about damaging the Waterpik as it's made to be used in the shower when you need too.
I've used my cordless Waterpik in the shower before without issues.
You won't get shocked because the cordless Waterpik hasn't got enough voltage in the batteries to cause a shock like an electrical device such as a hair dryer would.
Of course you should never use a hair dryer in the shower or bathtub because it could fall into the bathtub and if the shower got the hair dryer wet it could shock you as well.
But for a cordless Waterpik or even cordless beard trimmer or leg shaver that's safe to use in the shower.