A woman's working with her husband on the farm, factory, or house is permissible. She is also permitted to work with her Mahram (unmarriageable relative) men, if there are no non Mahram men among them. The same ruling applies to her work with women. Thus, she is forbidden to work only with nonMaharm men.
This is because the woman's work with nonMahram men causes widespread corruption and great temptation. She may also be in a position where she is alone with men who may see part of her beauty. The perfect Islamic Shari`ah came to bring about and fulfill the benefits, minimize and eliminate the harms, and block the means to forbidden acts. This principle is often reiterated in the Qur'an and Sunnah. Man will not achieve happiness, glory, or dignity in the worldly life and the Hereafter except by abiding by the teachings of the Islamic Shari`ah, avoiding its violations, and patiently calling to them. May Allah guide us all to what pleases Him! May Allah protect us all from the delusive temptations! He is Most Generous, Most Benevolent!