What needs to be fixed on a 1997 Ford Escort that shakes and then stalls when stopped for long periods of time?

Try a minor tuneup by changing the spark plugs and checking the distributor contacts. Sounds like the vehicle is burning rich which is what's making it shake and finally stall while stopped. Dirty or worn out plugs or even a bad spark due to corroded or dirty contacts in the distributor will cause this.