  A reconfigurable intelligent surface (RIS) allows a reflection transmission
path between a base station (BS) and user equipment (UE). In wireless
localization, this reflection path aids in positioning accuracy, especially
when the line-of-sight (LOS) path is subject to severe blockage and fading. In
this paper, we develop a RIS-aided positioning framework to locate a UE in
environments where the LOS path may or may not be available. We first estimate
the RIS-aided channel parameters from the received signals at the UE. To infer
the UE position and clock bias from the estimated channel parameters, we
propose a fusion method consisting of weighted least squares over the estimates
of the LOS and reflection paths. We show that this approximates the maximum
likelihood estimator under the large-sample regime and when the estimates from
different paths are independent. We then optimize the RIS phase shifts to
improve the positioning accuracy and extend the proposed approach to the case
with multiple BSs and UEs. We derive Cramer-Rao bound (CRB) and demonstrate
numerically that our proposed positioning method approaches the CRB.
