Many have done this, BUT...there is always a chance that you will be asked to pickup the card in-person. It's rather rare, but it does happen.
Also, make sure that when the friend couriers the card to you, that there are no restrictions with the card being imported to [insert country, here]. Because the PR card contains a RFID chip, some countries prohibit them from being imported (have seen some discussions in these forums, but can't recall which ones may [still] be on that list.
You can apply for a PRTD while you are still in Canada, which seems to be a recent change from IRCC.
Have a look at this thread:
https://www.canadavisa.com/canada-immigration-discussion-board/threads/prtd-application-submitted-in-canada-success-story.794260/