At the appearance of the minor before the court at the shelter care hearing, all witnesses present shall be examined before the court in relation to any matter connected with the allegations made in the petition.
The court shall require documentation by representatives of the Department of Children and Family Services or the probation department as to the reasonable efforts that were made to prevent or eliminate the necessity of removal of the minor from the minor's home and shall consider the testimony of any person as to those reasonable efforts. If the court finds that it is a matter of immediate and urgent necessity for the protection of the minor or of the person or property of another that the minor be placed in a shelter care facility or that the minor is likely to flee the jurisdiction of the court and, further, finds that reasonable efforts have been made or good cause has been shown why reasonable efforts cannot prevent or eliminate the necessity of removal of the minor from the minor's home, the court may prescribe shelter care and order that the minor be kept in a suitable place designated by the court, in a shelter care facility designated by the Department of Children and Family Services or a licensed child welfare agency, or in a facility or program licensed by the Department of Human Services for shelter and treatment services; otherwise, it shall release the minor from custody. If the court prescribes shelter care, then in placing the minor, the Department or other agency shall, to the extent compatible with the court's order, comply with Section 7 of the Children and Family Services Act. If the minor is ordered placed in a shelter care facility of the Department of Children and Family Services or a licensed child welfare agency, or in a facility or program licensed by the Department of Human Services for shelter and treatment services, the court shall, upon request of the appropriate Department or other agency, appoint the Department of Children and Family Services Guardianship Administrator or other appropriate agency executive temporary custodian of the minor and the court may enter such other orders related to the temporary custody as it deems fit and proper, including the provision of services to the minor or the minor's family to ameliorate the causes contributing to the finding of probable cause or to the finding of the existence of immediate and urgent necessity. Acceptance of services shall not be considered an admission of any allegation in a petition made pursuant to this Act, nor may a referral of services be considered as evidence in any proceeding pursuant to this Act, except where the issue is whether the Department has made reasonable efforts to reunite the family. In making its findings that reasonable efforts have been made or that good cause has been shown why reasonable efforts cannot prevent or eliminate the necessity of removal of the minor from the minor's home, the court shall state in writing its findings concerning the nature of the services that were offered or the efforts that were made to prevent removal of the child and the apparent reasons that such services or efforts could not prevent the need for removal. The parents, guardian, custodian, temporary custodian, and minor shall each be furnished a copy of such written findings. The temporary custodian shall maintain a copy of the court order and written findings in the case record for the child. The order, together with the court's findings of fact in support thereof, shall be entered of record in the court.
Once the court finds that it is a matter of immediate and urgent necessity for the protection of the minor that the minor be placed in a shelter care facility, the minor shall not be returned to the parent, custodian, or guardian until the court finds that such placement is no longer necessary for the protection of the minor.
The clerk shall set the matter for hearing not later than 14 days after such motion is filed. In the event that the court modifies or vacates a temporary custody order but does not vacate its finding of probable cause, the court may order that appropriate services be continued or initiated in behalf of the minor and the minor's family.
705 ILCS 405/4-9