Upvote:1
As long as you are residing legally in the country you can apply for a visa to Pakistan:
Applicants holding passports other than Australia/ Fiji Passport should provide proof of their residential status in Australia/Fiji. Their passports must contain the appropriate entry. All others should apply for visa in their country of origin.
From the Pakistan Embassy in Australia website
You will need to show proof of travel, funds and your friend's details. In addition a letter from your friend addresses to the embassy and a copy of his/her NIC (national identity card) should also help.