MOSUL, Iraq—Five kilograms of flour, a laptop and instant noodles were among the items Suzanne was asked to procure from a market in Iraq’s northern city of Mosul. If the task appears mundane, its purpose wasn’t: Suzanne was shopping for Islamic State.

“I knew it was wrong, but need compelled me,” she said. The 40-year-old Iraqi mother from Mosul was detained two months ago and is now awaiting trial for aiding and abetting Islamic State. The chief judge at the court where she is being tried asked that Suzanne’s surname be...