The pair correlation function is very commonly used in describing the degree of attraction or repulsion between points in stationary point processes. Non-stationary spatial point processes arise in many applications, and it would be useful to have more flexible versions of the pair correlation function for these situations. The traditional pair correlation function is free of covariates and depends only on the distance between the two points. In this article, we consider point processes in which the second order intensity function depends not only on the distance between the two locations involved, but may also depend on the values of covariates at these locations. This leads to point processes where the degree of attraction or repulsion between points depends on spatially varying covariates. We propose specific parametric and semi-parametric forms for the second order intensity, and develop numerical procedures to estimate the parameters in these models. We apply our approach to simulated data from cluster processes and log-Gaussian Cox processes and also to real data.