From correlation functions to event shapes in QCD