A division bench of Chief Justice R Subhash Reddy and V M Pancholi admitted the PIL and asked the public prosecutor to take instructions from the state government on the issue.
The court has kept the matter for further hearing on June 8.
Public prosecutor Manisha Lav Kumar was asked to take instructions from the government.
Ribeiro had served as the DGP of Gujarat and Punjab, the latter during the height of insurgency in the northern state which earned him the sobriquet as a super cop.
Also Read
He has stated that Pandey's holding the post could hamper the investigation and influence witnesses in the alleged fake encounter of Ishrat Jahan and three others in which he is an accused.
Pandey, an accused in the case, was jailed after Central Bureau of Investigation (CBI), which is investigating the case, charge sheeted him along with other police officials in the encounter case.
Pandey, who was suspended after his arrest in the Ishrat fake encounter case, was taken back in service four days after his release on bail on 5th February 2015.
After being in jail for eighteen months before his release on bail, he was appointed as Director of Anti-Corruption Bureau. A case is pending in an Ahmedabad court.
Ishrat (19), Javed Shaikh alias Pranesh Pillay, Amjadali Akabarali Rana and Zeeshan Johar were killed in an alleged fake encounter on the outskirts of Ahmedabad on June 15, 2004.
Gujarat police had then claimed that the four with links to Pakistan based Lashkar-e-Taiba had come to the city to kill the then chief minister Narendra Modi.