I have been following Barilla's passive cooking recommendations[0] for years to great effect. You boil the pasta for a short amount of time and then turn off the stove and put the lid on. Takes a tiny amount longer than leaving the stove on the entire time but reduces energy use.
[0]: https://www.barilla.com/en-gb/campaign/passive-cooking