Shimla was annexed by the British in 1819, after the Gurkha war. At that time it was known for the temple of Hindu Goddess Shyamala Devi.
A Journey into the Past, 23 November 2012.
Shimla may have been called the summer capital, but for all practical purposes this was the real Capital of India as the Government of India stayed there for the better part of the year moving down to Kolkata and later to New Delhi only during the winter months. As the summer capital of the British Raj, Shimla came to be known as ‘the workshop of the Empire’.Ashok Kumar