I want the shutdown feature to activate whenever I turn down the lid and close my MacBook Pro. It's a machine I use for work so I need the disk encryption to kick in every time I'm travelling with the Mac, and its easy to forget turning it off. Is there a setting somewhere that allows this, or is there an app/script I can run?
There doesn't seem to be a good way to do this as explained by @asmeurer in his answer
a shutdown in general may require user action (e.g., from an application that doesn't use the auto save model, or from an application that is frozen or becomes frozen when the OS tries to quit it).
maybe your best bet would be an app that closes everything for you every time you close your lid. However such an app would not be that much quicker than manual shut down.