I received some Playstation Plus free games during my subscription, but my subscription has since expired and I am unable to play them. If a friend with Playstation Plus signs into my console and activates it as their primary console, can I play the games I received for free as a Playstation Plus subscriber from my account again?
If your friend activates your PS4 as their primary and they have PlayStation Plus while you do not, then you can play whatever games they have licenses for (what is in their Library).
If you have games that you downloaded as free PS+ games during your PS+ subscription that your friend also received during that time (e.g. your friend also had a PS+ subscription and was able to receive that game for free) or your friend simply has bought that game, then yes, you will regain access to it, as the primary user's licenses are shared with all secondary accounts on the console.
However, if your friend does not have a license for that game, then you will not be able to play it, regardless of whether or not your friend has PS+.
tl;dr: If your friend owns the games in question, then yes. Otherwise, no.