Have no friends not equal to yourself.
ですが、仲良し内閣ではダメなので
A friend in need is a friend indeed
When you have a problem, your true friends will stay with you.
All your other "friends" will suddenly have no time for you.
So when you are in trouble, you will find out who your real friends are.
"in need" here means "when you have a problem."