よりしかたがない・ざるを得ない: the difference
よりしかたがないN2
Meaning
There is no choice but, Can't be helped, Inevitable
Past papers
Example
税金は、高くとも納めるより仕方がない。
We have no choice but to pay taxes, even if they are high.
ざるを得ないN2
Meaning
Can't help doing, Have no choice but
Past papers
Tested 3 times in past papers
Example
サプライズのプレゼントに、驚かざるを得なかった。
I couldn't help but be surprised at the surprise present.
How to tell them apart
「よりしかたがない」: the methods are used up; only this one is left.
「ざるを得ない」: very unwilling, but forced by circumstances: 「気が進まないが、引き受けざるを得ない」 (I don't feel like it, but I have to take it on).