Let the total number of pairs of basketball shoes the store had initially be represented as \( x \).
According to the problem, the store has sold 65% of its inventory, which can be expressed mathematically as:
\[ 0.65x = 166 \]
To find \( x \), we divide both sides of the equation by 0.65:
\[ x = \frac{166}{0.65} \]
Calculating the right side:
\[ x \approx 255.38 \]
Rounding to the nearest whole number:
\[ x \approx 255 \]
Therefore, the store originally had approximately 255 pairs of basketball shoes.
The correct answer from the given options is:
? = 255 shoes.