In the end Epicurus is defining pleasure so broadly that in the end it's not really logically consistent to say "friendship and pleasure" given that. Friendship or anything else is either pleasurable (or leading to more pleasure than pain, even if some pain is required to obtain it) or there is no reason to pursue it.
I think that is why it works better to say that there are multiple "goods" for an Epicurean -- friendship is a great good, but not the "highest good". And "virtue" is a good, when it leads to a pleasant life. As for "pleasures", you could choose to pursue a pleasure that results in 55 percent pleasure and 45 percent pain - but that wouldn't be the "highest good" -- the highest good is a good which is as good as it can get (PD03).
The point I think needs to be made is that you can't just say that your whole goal is to avoid pain. If so, then you can just kill yourself. Your goal is to live pleasurably, which requires that you live, being alive being a good/pleasurable thing unless you are in a situation where you are guaranteed more pain than pleasure). Treasuring life in such a way is a positive activity.
There is a difference in mental cognition between "avoiding pain" -vs- "choosing pleasures which do not lead to pain" because there are a lot of pleasures which do not lead to any pain. Also, there are prudent ways to engage with objects of pleasure that do not result in pain (for example eating the right amount rather than too much).
and if you just say "My highest goal is to avoid pain" in 2026 English, then the majority of people are rightly going to say that the only way to guarantee success in that is to kill yourself.
Probably better to say "my highest goal is to seek pleasures which have good and pleasant results rather than painful consequences". I think that confining this to the types of pleasures, rather than all necessary actions undertaken in life (such as getting into a car and driving to work which has always a small risk of being in a car accident), works much better for cognition of choices. But of course you do need to consider what is safe to do, such as avoiding driving in a blizzard. And all of this boils down to "well-being".