
831 N.E.2d 1215 (2005)
358 Ill. App.3d 277
294 Ill.Dec. 890
In re AUSTIN D., a Minor (The People of the State Of Illinois, Petitioner-Appellee,
v.
Kristina Dison, Respondent-Appellant).
No. 4-05-0129.
Appellate Court of Illinois, Fourth District.
June 30, 2005.
Larry R. Silkwood, of Urbana, for appellant.
Julia Rietz, State's Attorney, of Champaign (Norbert J. Goetten, Robert J. Biderman, and Anastacia R. Brooks, all of State's Attorneys Appellate Prosecutor's Office, of counsel), for the People.
Justice MYERSCOUGH delivered the opinion of the court:
In December 2004, the trial court adjudged Austin D. neglected. In January 2005, the court made Austin D. a ward of the court and removed custody and guardianship from respondent, Kristina Dison. Kristina appeals, arguing the trial court erred by (1) denying her motion to substitute judge, (2) adjudging Austin D. a neglected minor, and (3) finding it in the best *1216 interests of Austin D. to remove him from the custody of Kristina. Because the court erred by denying the motion to substitute, we reverse and remand.

I. BACKGROUND
On June 14, 2004, the State filed a five-count petition alleging that Austin D., born May 24, 2001, and the minor child of Kristina and her husband, John Dison, Jr. (John), was a neglected minor pursuant to section 2-3(1)(b) of the Juvenile Court Act of 1987 (Juvenile Act) (705 ILCS 405/2-3(1)(b) (West 2002)). (John is a party to a separate appeal, No. 4-05-0096, 358 Ill. App.3d 794, 294 Ill.Dec. 881, 831 N.E.2d 1206, 2005 WL 1553955.) Specifically, the petition alleged that Austin D.'s environment was injurious to his welfare when he resided with his parents because he was exposed to the risk of substance abuse, physical harm, sexual abuse, and criminal activity and because his parents allowed him to have unsupervised contact with a registered sex offender. The petition requested a shelter-care hearing be held instanter.
On June 14, 2004, the trial court called the matter for a shelter-care hearing. Kristina was present. The court explained to Kristina her rights and the basic procedure for the hearing. After being asked whether she wanted the court to consider appointing an attorney to represent her, Kristina expressed her intention to attempt to hire an attorney. The court continued the matter to the following day to allow Kristina time to speak to an attorney.
On June 15, 2004, the matter reconvened. At Kristina's request, the trial court appointed counsel but proceeded with the hearing without Kristina's appointed counsel present. The State presented the testimony of Pam Wendt, a Department of Children and Family Services (DCFS) investigator. Wendt testified that she spoke to John Dison, Sr. (Sr.), Austin D.'s paternal grandfather and a registered sex offender, and he told her he provided day-care services to Austin D. while both parents worked. Wendt also testified that she accompanied a Champaign County sheriff's department officer and Ludlow police department officers during an investigation of Kristina regarding allegations of substance abuse or production. The officers showed Wendt a pipe and four halves of a soda pop can "typically used for some sort of drug inhalation or burning"that they found in Kristina and John's residence.
The State also presented the testimony of Dawn Bachtold, a public service administrator with DCFS. Bachtold testified that she interviewed seven-year-old Donavan D., who claimed to have witnessed activity that Bachtold recognized as methamphetamine manufacturing. According to Donavan D., Kristina participated in this process with Donavan's mother and his mother's boyfriend. Kristina presented no evidence.
Following the hearing, the trial court found probable cause to believe that Austin D. was a neglected minor and that no efforts could be made to prevent the removal of the minor, given the exigent circumstances. The court further found it in the best interests of Austin that shelter care be ordered and temporary custody be placed with the guardianship administrator of DCFS. The court also ordered that visitation be supervised by the temporary custodian or a responsible agency designated by the custodian. The court set the adjudicatory hearing for August 16 and 17.
On July 27, 2004, counsel for Kristina filed a motion for substitution of judge as *1217 of right, alleging there had not been a substantial ruling on any issue in the cause by the current judge assigned to the case. On August 16, 2004, associate judge Holly Clemons denied the motion on the ground that she heard the shelter-care hearing and made substantive rulings "as to those issues involved with regard to shelter[-]care issues[,] including temporary custody, immediate and urgent necessity, [and] reasonable efforts." Following a motion to reconsider, the trial court again denied the motion, stating:
"Believe [sic] that the [c]ourt has ruled on substantial issues including, obviously, probable cause, immediate and urgent necessity, best interests of the minor, and also reasonable efforts and visitationtemporaryI'm sorry, visitation issues with respect to the temporary[-]custody hearing.
Court will also note that the [r]espondent [p]arents were afforded an opportunity to obtain an attorney. We set the shelter[-]care hearing over from June 14th, 2004, to June 15th, 2004, to allow, the [r]espondent [p]arents to obtain an attorney for the continued shelter[-]care hearing. They did not retain an attorney for the June 15th hearing and we proceeded to hearing at that time.
Parents had an opportunity to obtain an attorney and file a motion to substitute as of right for the June 15th hearing, and they chose not toor did not at that point."
Beginning August 18, 2004, and continuing on several additional dates, the trial court held the adjudicatory hearing. On December 20, 2004, the court found Austin D. neglected due to an environment injurious to his welfare.
On January 18, 2005, the trial court held the dispositional hearing. Following the hearing, the court found Kristina unfit and unable for reasons other than financial circumstances alone to care for, protect, train, and discipline Austin D. The court also found it in the best interests of Austin D. that he be adjudged a neglected minor and be made a ward of the court. The court placed custody and guardianship of Austin D. with the guardianship administrator of DCFS. This appeal followed.

II. ANALYSIS
Kristina first argues that the trial court erred when it denied her motion for substitution of judge. We review a ruling on a motion to substitute de novo, and such review "should lean toward favoring rather than defeating a substitution of judge." Rodisch v. Commacho-Esparza, 309 Ill.App.3d 346, 350, 242 Ill.Dec. 837, 722 N.E.2d 326, 329 (1999).
Section 2-1001(a)(2) of the Illinois Code of Civil Procedure provides, in relevant part:
"(a) A substitution of judge in any civil action may be had in the following situations:
* * *
(2) Substitution as of right. When a party timely exercises his or her right to a substitution without cause as provided in this paragraph (2).
(i) Each party shall be entitled to one substitution of judge without cause as a matter of right.
(ii) An application for substitution of judge as of right shall be made by motion and shall be granted if it is presented before trial or hearing begins and before the judge to whom it is presented has ruled on any substantial issue in the case, or *1218 if it is presented by consent of the parties." 735 ILCS 5/2-1001(a)(2) (West 2002).
The trial court has no discretion to deny a proper motion for substitution of judge. Rodisch, 309 Ill.App.3d at 350, 242 Ill.Dec. 837, 722 N.E.2d at 329.
A petition for substitution of judge as of right is untimely if filed after the judge has ruled on a substantive issue in the case. In re Daniel R., 291 Ill.App.3d 1003, 1014, 225 Ill.Dec. 900, 684 N.E.2d 891, 898 (1997). The reason for this rule is that it prevents a litigant from "judge shopping" after forming an opinion that the judge may be unfavorably disposed toward his cause. Daniel R., 291 Ill.App.3d at 1014, 225 Ill.Dec. 900, 684 N.E.2d at 898. A ruling on a substantive issue is one that directly relates to the merits of the case. Rodisch, 309 Ill.App.3d at 350-51, 242 Ill.Dec. 837, 722 N.E.2d at 330. A motion for substitution may also be denied, in the absence of substantive ruling, if the movant had the opportunity to form an opinion as to the judge's reaction to her claims. In re Estate of Gay, 353 Ill.App.3d 341, 343, 288 Ill.Dec. 925, 818 N.E.2d 860, 863 (2004).
Kristina argues that the issue in this case is whether Austin D. was a neglected minor for any reason contained in the petition. According to Kristina, the temporary-custody order did not address issues of a substantive nature because the order merely involved temporary-custody and guardianship issues, not issues going to the substance of the case.
The State argues that the trial court's temporary-custody order constituted a ruling on a substantive issue because it contained factual findings related to the merits of the petition: (1) the parents knowingly allowed a convicted sex offender to babysit the minor without supervision or without completing sex-offender treatment; (2) respondent parents "cooked" methamphetamine in the minor's presence; and (3) drug paraphernalia was located in the residence. Further, the order contained the ruling that the court had probable cause to believe the minor was neglected.
Whether a shelter-care ruling constitutes a ruling on a substantive issue appears to be an issue of first impression. The parties cite no cases directly on point, nor did our search locate any. However, we find persuasive two cases decided by this court, In re A.N., 324 Ill.App.3d 510, 258 Ill.Dec. 74, 755 N.E.2d 155 (2001), and People v. Agnew, 108 Ill.App.3d 79, 63 Ill.Dec. 808, 438 N.E.2d 950 (1982), aff'd, 97 Ill.2d 354, 73 Ill.Dec. 544, 454 N.E.2d 641 (1983).
In Agnew, 108 Ill.App.3d at 82, 63 Ill.Dec. 808, 438 N.E.2d at 952, this court stated, in dicta, that a probable cause finding is not a per se ruling of substance precluding automatic substitution of judge under section 114-5(a) of the Code of Criminal Procedure of 1963 (Ill.Rev.Stat. 1979, ch. 38, par. 114-5(a) (now 725 ILCS 5/114-5(a) (West 1998))). Citing People v. Chambers, 9 Ill.2d 83, 136 N.E.2d 812 (1956), the court noted "some indication" that a ruling is not one of substance unless the court reviews the defendant's case and assesses the credibility of the defendant's evidence. Agnew, 108 Ill.App.3d at 81-82, 63 Ill.Dec. 808, 438 N.E.2d at 951, citing generally Chambers, 9 Ill.2d 83, 136 N.E.2d 812 (holding that order on motion to suppress, wherein both parties presented their theories of the alleged crime and offered testimony, was a ruling on a substantive issue).
*1219 Citing Agnew, this court held in A.N. that the trial court erred by denying the State's motion for automatic substitution of judge. A.N., 324 Ill.App.3d at 513, 258 Ill.Dec. 74, 755 N.E.2d at 158. The A.N. court found that a ruling on a petition for temporary detention under section 5-501(2) of the Juvenile Act (705 ILCS 405/5-501(2) (West 2000)), in which the court found an "`immediate and urgent necessity that the minor be detained for the protection of the minor and the public,'" was not a substantive ruling on the merits. A.N., 324 Ill.App.3d at 513, 258 Ill.Dec. 74, 755 N.E.2d at 158 (wherein the State presented testimony of investigator about his investigation and the minor's confession).
A shelter-care hearing is similar to both a probable-cause hearing and a temporary-detention hearing under section 5-501(2) of the Juvenile Act (705 ILCS 405/5-501(2) (West 2002)). See, e.g., In re L.M., 189 Ill.App.3d 392, 395, 136 Ill.Dec. 795, 545 N.E.2d 319, 322 (1989) (referring to the shelter-care hearing as a "probable[-]cause hearing"). At the shelter-care hearing, the trial court determines whether there is probable cause to believe that a minor is abused, neglected, or dependent. 705 ILCS 405/2-10(1), (2) (West 2002). If the court finds probable cause, it must hear evidence and determine whether it is consistent with the health, safety, and best interests of the minor that he be released to his parent or placed in shelter care. 705 ILCS 405/2-10(2) (West 2002). If the minor is to be placed in shelter care, the court must find it a matter of immediate and urgent necessity that the minor be placed in a shelter-care facility and find that either reasonable efforts have been made or no reasonable efforts can be made to prevent or eliminate the necessity of removal of the minor from his home. 705 ILCS 405/2-10(2) (West 2002). Essentially, at a shelter-care hearing, the court determines whether a minor requires temporary placement outside the home. See, e.g., In re W.B., 213 Ill.App.3d 274, 283, 157 Ill.Dec. 101, 571 N.E.2d 1120, 1126 (1991).
To constitute a ruling on a substantive issue, the temporary-custody order must directly relate to the merits of the case. Rodisch, 309 Ill.App.3d at 350-51, 242 Ill.Dec. 837, 722 N.E.2d at 330. The "merits of the case" in this context include the following: (1) whether the minor is abused, neglected, or dependent; and (2) if so, whether it is consistent with the health, safety, and best interests of the minor and the public that he be made a ward of the court. 705 ILCS 405/2-21(1), (2) (West 2002).
In the instant case, the trial court heard two witnesses presented by the State and took judicial notice of Sr.'s criminal-sexual-assault court file. Based on this evidence, the court found probable cause to believe the minor was a neglected, abused, or dependent child. Under the reasoning noted in Agnew, we do not equate a finding of probable cause to believe that a minor is abused, neglected, or dependent with a finding on the merits that a minor is abused, neglected, or dependent, especially where, as here, the court reviewed only the State's case. See Agnew, 108 Ill.App.3d at 81-82, 63 Ill.Dec. 808, 438 N.E.2d at 951.
Admittedly, a counterargument may be made that the trial court's temporary-custody ruling alerted the parties that if the court believed the State's evidence at the adjudicatory hearing, it would find the minor neglected. Yet, at the shelter-care hearing, the court heard only two witnesses, both called by the State, and did *1220 not have to make conflicting credibility determinations. Moreover, Bachtold testified as to her conversation with seven-year-old Donavan D., but the court did not hear from Donavan himself. The court made no indication whether it would find credible Donavan's claims.
In addition, the trial court specifically informed Kristina at the June 14 hearing that the State had to prove four things before temporary custody could be removed from her: (1) that probable cause existed to believe the minor met the legal definition of abused, neglected, or dependent; (2) that it was a matter of immediate and urgent necessity that a temporary custodian be appointed; (3) it was in the best interests of child that a custodian be appointed; and (4) reasonable efforts had been made to eliminate the need for removal or there was good reason why those efforts had not been made. The court stated it would decide "where the child involved lives between today and the next court hearing where I hear all the evidence and decide whether or not the State has proven there is a problem in the home." With regard to probable cause, the court informed Kristina at the June 14 hearing that the State had to prove that probable cause existed to believe that the minor met the legal definition of an abused, neglected, or dependent child:
"Rather than deciding if anything those witnesses are saying is true, rather than deciding whether or not the State can actually prove the case, the only thing I decide today is this. If that's all true, if the State does prove everything they think they can prove, if everything their witnesses are saying is true, is that enough to meet the legal definition of an abused, or neglected, or dependent child. If it is, then there's probable cause. * * * The critical thing is that you understand I do not decide today who is telling the truth and who is not. What I will decide is, that if that's all true, is that enough?"
The State argues that the trial court made factual findings in its temporary-custody order that relate to the merits of the case. The transcript of the shelter-care hearing reveals that the court made certain findings:
"It's clear from the testimony adduced today that the seven[-]year[-]old has indicated that there has beenhe's been in the presence of meth manufacturing that involved the [r]espondent [p]arents in this case.
In addition, apparently, there's been smoking of marijuana in the presence of this minor.
* * *
In addition, [r]espondent [p]arents have allowed John Dison, Sr., who's been convicted of aggravated criminal sexual abuse October 13th, 1992, to baby-sit Austin on a regular basis. Mr. Dison has not completed any sex[-]offender treatment."
However, the court's written order makes clear that these "findings" relate to the support for finding probable cause. Specifically, the order provides that the court found "probable cause to believe that the minor is neglected as set forth in the petition based on the following facts." The court's admonishments made even clearer that these "factual findings" were made without a determination of credibility and were accepted as true only for the purpose of the shelter-care hearing.
This case is particularly troubling given the fact that Kristina was denied her statutory *1221 right to counsel at the shelter-care hearing. See 705 ILCS 405/1-5(1) (West 2002) (providing that the minor's parents have the right to be represented by counsel, that counsel shall be appointed if the parent is financially unable to employ counsel, and that counsel shall appear at all stages of the trial court proceeding). While Kristina does not specifically raise this issue on appeal, the issue merits discussion.
The trial court appointed counsel to Kristina but proceeded to the hearing without counsel present due to the time constraints for holding a shelter-care hearing under the Juvenile Act. See 705 ILCS 405/2-9(1) (West 2002) (requiring a temporary-custody hearing be held within 48 hours of the minor being taken into temporary protective custody, exclusive of weekends and court-designated holidays). The statute does not allow a continuation of the hearing, unlike section 2-14(c) (705 ILCS 405/2-14(c) (West 2002)), which provides for a continuance of the adjudicatory hearing under certain circumstances. It also appears that the 48-hour requirement cannot be waived. See, e.g., People v. Clayborn, 90 Ill.App.3d 1047, 1051, 46 Ill.Dec. 435, 414 N.E.2d 157, 160 (1980) (holding that the temporary unavailability of the State's witness was insufficient reason for failing to hold detention hearing within 36 hours of juvenile being taken into custody, therefore requiring his immediate release from custody).
We are sympathetic to the plight of the trial court and the counties' costs of providing counsel at the shelter-care hearing. Here, through no fault of the court, the court was faced with the prospect of violating either the 48-hour requirement or the parties' statutory right to counsel. Presumably due to the fact that the delay was due to the parentsfirst requesting time to obtain counsel, then requesting counsel be appointedthe court chose to proceed without counsel present. The Juvenile Act is replete with confusing language and procedures. Little wonder a trial court is unsure how to proceed in unique circumstances such as these.
To a certain extent, it appears illogical that Kristina was entitled to counsel and a hearing within 48 hours and yet we nonetheless find that the temporary-custody order was not a substantive ruling. We do not hold that the temporary-custody order can never be a substantive ruling. In many cases, it may be a substantive ruling. On these facts, however, where the court heard only limited evidence by the State, the temporary-custody order did not constitute a substantive ruling.
To conclude, in light of the Agnew and A.N. cases, and given the facts of this particular case, we find that the trial court's shelter-care order was not a substantive ruling directly related to the merits of the case and the motion to substitute judge should have been granted. Any and all orders entered after the motion for substitution is improperly denied are null and void. Aussieker v. City of Bloomington, 355 Ill.App.3d 498, 500, 291 Ill.Dec. 52, 822 N.E.2d 927, 929 (2005).

III. CONCLUSION
For the reasons stated, we reverse the trial court's order denying Kristina's motion to substitute judge, vacate the court's adjudicatory and dispositional orders, and remand for proceedings not inconsistent with this disposition.
Reversed in part and vacated in part; cause remanded.
TURNER and KNECHT, JJ., concur.
