What if I purchase a home and take out a mortgage on my name on behalf of a friend. He pays me the money to give to the bank every month for the interest and principle. Is there a problem with interest because he is paying me to pay the bank?
The situation you describe is one where your friend's obligation is to you alone. His failure to return the loan to you would not concern the bank. Therefore you are forbidden to charge him any interest at all without arranging a "heter iska" in advance. The "heter iska" transforms your "loan" to your friend into an "investment" by creating the possibility where under very special circumstances if he loses the investment he need not return your investment. The Kitzur Shulchan Aruch (Rabbi Shlomo Ganzfried's code of Jewish Law) aricle 66 has the wording of a "heter iska" which you should draw up before taking the mortgage for your friend.