n brief, Tawassul and Isteghatha are not shirk because:
1- The one who does them is not worshipping the Prophet/Imam. He only worships Allah.
2- Allah has commanded us to seek their intercession. Just as Allah commanded the angels to prostrate to Adam. Was that shirk?
For an in-depth discussion on this, please see:
You may see the last one especially.