Invitation Letter from friend

Does anyone having a “Resident Card” living and doing job in uk for more than 5 years, not having British passport can provide me invitation letter for PLAB 2 visit visa? Will that be valid? If anyone have any information regarding this, please help.

Thanks in advance.