One should recite that Ziyarat with the intention of each one of them or with the intention of Ziyarat of their holy spirits which Late Kualyni (a) has written is Kafi, Shaykh Tusi (a) in Tahzeeb and Quluwayh (a) in Kamiluz Ziyarah. The starting part of this Ziyarat is as follows:
This is Ziyarat-e-Jameah. One should send salutations on Mohammed and his progeny as much as possible after the Ziyarat. Prayer for himself and other believers as he wishes.