しかない can also be added to the dictionary form of verbs to express that you have no choice but to do something (usually against your will).
やるしかないね。
We’ll just have to do it.
待つしかない。
I’ll have to wait.
It’s worth just comparing the two different usages of しか.
オンラインでしか買い物しない。
I will only shop online [out of choice].
オンラインで買い物するしかない。
I have no choice but to shop online [you live too far from the shops].