しかない 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].