I am willing to grant that the Pope wasn't praying to Allah, and that he did not consider himself to be participating in a Muslim rite. Nonetheless, I find this move completely astonishing.
The Apostle Paul wrote to the Corinthians regarding participation in the worship of other religions:
Consider the people of Israel: Do not those who eat the sacrifices participate in the altar? Do I mean then that a sacrifice offered to an idol is anything, or that an idol is anything? No, but the sacrifices of pagans are offered to demons, not to God, and I do not want you to be participants with demons. You cannot drink the cup of the Lord and the cup of demons too; you cannot have a part in both the Lord's table and the table of demons. Are we trying to arouse the Lord's jealousy? Are we stronger than he?It is one thing to exhibit kindness, generosity, and mercy toward people from other religions. It is quite another to validate them by participating in their worship.
--1 Cor. 10:18-22.
(HT: Smart Christian)