Much hinged on Shah, a double centurion in the drawn first Test, and he proved equal to the task as Afghanistan reached 291-7 by the close of play for a 205-run lead