Travelling to kaafir countries for the purpose of
    teaching and da’wah
Question

                The Messenger of Allaah 
      (peace and blessings of Allaah be upon him) said: “I have nothing to do with every Muslim who settles among the mushrikeen.” (Reported by al-Tirmidhi, no. 1604; Abu Dawood, no. 2645. Classed as Hasan by al-Albaani. See also Saheeh al-Jaami’, no. 1461). Nowadays we see hundreds of thousands of Muslims settling among the mushrikeen. Some good people have gone to set up Islamic institutions there, for the purpose of teaching the children of the Muslims, primarily, and also to call people to Allaah. If a teacher is asked to go and settle there in order to teach and call people to Allaah, is it
permissible for him to respond?
Praise be to Allah.Undoubtedly settling among the mushrikeen is
    harmful, for one is exposing oneself to temptation and evil. But if his settling there
    will do more good, such as calling people to the religion of Allaah or teaching the Muslim
    children the correct ‘Aqeedah, then there is nothing wrong with it, because the good
    outweighs the evil that may be expected. The hadeeth “I have nothing to do with every
    Muslim who settles among the mushrikeen” may be interpreted as referring to those who
    cannot practise their religion openly in the place where they settle, and those who are
    able to practise their religion openly are not included in this hadeeth. But it is better
    to say that if a person’s settling there is more beneficial to Islam and the Muslims,
    then it is OK.