How to turn off iPhone 5 without having to use the screen or buttons
Let the battery die, that will shut down the phone. Once dead and off, plugging the phone in to charge will turn it back on. This is assuming both the power and home buttons do not work.