In food chains, fungi act as decomposers, also called saprotrophs, which recycle nutrients in an ecosystem.They also break down surface waste and release nitrogen back into the soil in the form of ammonium nitrate, a nutrient that plants need for survival.