Bring a large pot of heavily salted water to a boil and cook the orzo until just tender, then drain and set aside.
Warm the olive oil over medium heat in a medium pot.
Add the chopped green onions and minced garlic to the oil, cooking for about a minute until the onions soften and the garlic releases its aroma.
Season the mixture with salt and pepper, stirring well.
Sprinkle the flour over the mixture and stir continuously for about 30 seconds to eliminate any raw flour flavor.
Gradually pour in the milk while whisking constantly to avoid lumps, then cook, stirring occasionally, until the sauce thickens and simmers gently, about 5 to 8 minutes.
Mix the chopped spinach into the sauce, allowing it to wilt evenly.
Blend in the shredded parmesan cheese, stirring until it completely melts and the sauce is silky smooth.
Return the cooked orzo to the pot and stir until every grain is coated in the creamy sauce. Remove from heat and serve promptly.