Contact a lending institution in your target country and ask if it's legal for foreign residents to borrow money. If the answer is no, you may have to seek out alternatives. If it's possible, you may need to get further legal advice to guide you through the process. Consider contacting a legal firm in the country that you want to borrow money in about any additional procedures that you may need to follow.
Apply for the loan or credit card from the foreign lending institution of your choice. As you're unlikely to have an established credit rating in the country in question, the institution will likely require that you go through some intensive financial screening. Small countries usually lack formalized credit rating procedures, so this kind of process will be expected. The loan officers at the bank will investigate your income, existing debts and all other aspects of your finances to determine your eligibility for a loan, credit card or line of credit.
Review the loan agreement that the foreign institution provides to you and sign it. Once you borrow the money, you will likely need to keep it in accounts in that country. Most foreign banks only offer loans in the national currency. Sign the agreement once you are comfortable with the contract.