The number of pairs of shoes Emily buys varies directly as the square of the area of the floor of her closet. If she can fit 12 pairs of shoes when her closet was 10 square feet, how many pairs of shoes will she fit when the area of her closet is 18 square feet?

12 pairs of shoes x (18 square feet / 10 square feet)^2 = 24.48 pairs of shoes

Therefore, Emily will fit 24 pairs of shoes when the area of her closet is 18 square feet.