Neither! It’s a trick question. We don’t use to congratulate or congratulations in connection with birthdays in English, except in very special cases (18, 21, 100, etc.): we normally just say Happy Birthday or Many happy returns, instead. And we don’t shake hands as we do so.
However, we can congratulate people on getting a job, winning an award, or getting married, for instance. And then a handshake is often part of the ritual. With is never used with to congratulate or congratulations – it’s always to congratulate (someone) on… and congratulations on…
©2015 Baxter Publishing, Hilversum, The Netherlands