Indian shares recover to end higher