the golden rule here seems to be DON'T. Why?
Two reasons.
One is that flying schools are continually going bust, in which case you're likely to lose a sum of money that is, for most people, quite a lot.
Second reason is that you then become a 'captive' customer and may find that pay-as-you-go customers are favoured, for example if there is nice weather and everybody wants to have a lesson at the same time.
I bought my training in blocks of 5 or 10 hours which seemed to me to be a decent compromise.