So to start, the easiest way to get Smarty into your project is to add it to the composer.json file like so:
Afterwards follow the usual steps for adding a new dependency with Composer. I've written a separate article about that here.
Then create a file called php.ini in your applications directory at the same location as your app.yaml file. Add the following contents to that file:
What the above does is instruct App Engine to allow cached template files to be included in your app from the Cloud DataStore.
In your application code, initialise Smarty like so:
The above assumes you have a 'templates' directory with your .tpl files. The compiled templates will be stored in the default bucket in the Cloud DataStore.
Now you can use Smarty as usual.