How to set MacBook Pro to turn off when closing lid?
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.