To what extent does China control Hong Kong's highest courts and ordinary courts? Some people have suggested that the chief executive of Hong Kong needs to be approved by China and thus it has some level of control over him; however true that might be, the next natural question is does it apply to the courts in Hong Kong and are there avenues through which China can exert its influence over them?
By far, Hong Kong's judiciary seems mostly independent.
Hong Kong's judiciary have ruled both for and against the government, and there is no clear political trend that can be observed from those rulings. Both the Hong Kong government and the Central People's Government's Hong Kong Liaison Office, as well as pan-democratic legislators and activists, have criticized or complained about Hong Kong's judiciary, but only seldomly so.
Therefore, it is not clear to me that Hong Kong's judiciary is "controlled" by either faction, and surely not by Beijing.
It is well-known that barristers in Hong Kong (the community from which most judges are appointed) generally have pan-democratic political leanings, but most of them generally support the Basic Law, so they do not have a particularly strong incentive or tendency to depart from the text and spirit of the laws.
5. Constitution of the Court
(3) The Court may as required invite judges from other common law jurisdictions to sit on the Court.
16. Hearing of appeals
(1) Subject to subsection (4), an appeal shall be heard and determined by the Court constituted as follows—
(a) the Chief Justice or a permanent judge designated to sit in his place under subsection (2);
(b) 3 permanent judges nominated by the Chief Justice; and
(c) 1 non-permanent Hong Kong judge or 1 judge from another common law jurisdiction selected by the Chief Justice and invited by the Court.