This posting is older than 6 months and can contain outdated information.
Thanks for asking.
Yes, you can assign actions for sleep and shutdown to any button on the Apple Remote.
To hardwire these actions to buttons on your remote (so these buttons do this and nothing else, regardless of the app used), go to Remote Buddy Prefs > Mapping > Global mapping and select "Miscellaneous > Put computer to sleep" and "Miscellaneous > Shutdown computer" respectively.
When Spotify is the active application, you can also control Spotify. To customize what actions the remaining buttons do, take a look at Remote Buddy Prefs > Mapping > Spotify and make changes if needed.
FYI: you can download a free trial version at https://www.iospirit.com/products/remotebuddy/download/ and test Remote Buddy for 30 days before making any purchase.
Cheers,
Felix