The average rating of a column is stored in a list column whose internal name is AverageRating. However, to sort on that column we need to make a POST request with a CAML query as it can't be ordered by in a normal HTTP GET request.
Make the changes from the below sample code in your spHttpClient's methods :
const options: ISPHttpClientOptions = {
headers: {'odata-version':'3.0'},
body: `{'query': {
'__metadata': {'type': 'SP.CamlQuery'},
'ViewXml': '<View>
<Query>
<OrderBy><FieldRef Name="AverageRating"" Ascending=""False"" /></OrderBy>
</Query>
<RowLimit>3</RowLimit>
</View>'
}}`
};
var endPoint = `${this.props.siteurl}/_api/web/lists/GetByTitle('Site Pages')/GetItems`;
this.props.spHttpClient.post(endPoint,
SPHttpClient.configurations.v1,
options)
.then((response: SPHttpClientResponse) => {
console.log(response.json());
return response.json();
});