It's sort of a dismissive way of saying a word. It can be used on any word. In this case maybe someone is saying that I my boat will sink but I believe my boat is very sound and will never sink, I might say Sink, shmink!
If someone said that I would fall if I tried climbing a cliff, I might say Fall, Shmall! meaning that I'm not worried about falling at all.
If someone said I would end up divorcing the man I'm about to marry, I might say Divorce, Shmivorce! believing that we'll be married forever.
So you can see how it can be used with any word by just adding the "shm" prefix to replace the first letter or two of the word.
It's a ridiculous way of speaking and is very rarely used.