Heat the stock to a simmer, stir in the rice or orzo, and cook until done.
In a small bowl, beat the eggs with a whisk until foamy, then whisk in the lemon juice. Stir in a cup of the hot broth while whisking. (Always add hot to cold, rather than cold to hot, to avoid nasty unpleasant things!)
Turn the heat off the broth and slowly whisk in the egg and lemon mix. Do not let it boil again.