The game will shuffle if no possible words are available to link. If you still haven't any available words after shuffling, the game will shuffle again a second time and a third time if no words still couldn't be linked.
If no words are possible after three shuffles, the level will fail and you will need to replay it.