Shastri offered a coconut to the 'Agrashala Ganapathy', who is believed to ward of hurdles.
Heavy rains lashing the city since this morning is threatening to play spoil sport.
The former cricketer spent an hour at the famous shrine this morning along with some BCCI officials and also offered 'butter' to Lord Hanuman for the health and well being of his family, temple sources said.
Shastri, who had visited the temple as a four-year-old with his mother, told the officials to bring her next time he visits the city.