Praise be to Allah.
Undoubtedly it is better for women to stay at home, as Allaah says (interpretation of the meaning):
“And stay in your houses” [al-Ahzaab 33:33]
And the Prophet (peace and blessings of Allaah be upon him) said: “Their houses are better for them.” (Narrated by Abu Dawood, al-Salaah, 480. Classed as saheeh by al-Albaani in Saheeh Sunan Abi Dawood, 530). Undoubtedly, giving women absolute freedom to go out is contrary to the commands of sharee’ah. Guardians have to be guardians in the fullest sense. Allaah says (interpretation of the meaning):
“Men are the protectors and maintainers of women” [al-Nisa’ 4:34]
Women should not go out unless it is necessary, and when it is necessary for a woman to go out, it should be with her husband’s permission. She should be careful to avoid that which Allaah has forbidden, and she should wear full hijaab, covering her face, etc. If she goes out wearing adornments and makeup or perfume, then this is not permitted. If there is no danger of fitnah and women go out in the manner required by sharee’ah, there is nothing wrong with their going out. Women at the time of the Prophet (peace and blessings of Allaah be upon him) used to go out to the market-places without mahrams.
The Prophet (peace and blessings of Allaah be upon him) permitted women to go out if there is an urgent need. He said, “It is permissible for you (women) to go out for your needs.” (Narrated by al-Bukhaari, Tafseer al-Qur’aan, 4421).
Ibn Hajar said in Fath al-Baari, Ibn Battaal said: The interpretation of this hadeeth is that it is permissible for women to engage in dealings according to their needs.