Religion doesn't totally determine foreign relations.Except the ones in Saudi Arabia...and Qatar and UAE, along with Pakistan, Turkey (although we're not too hep about their current leader), Egypt, and of course, Kosovo, which was @Estro Felino's question. I think our government likes most Muslim-majority countries, but there are a few who seem to be on their poop list.
But it's a big factor, not to be dismissed.