Error: expected primary-expression before '.' token

#include <dht.h>

This defines a class, with some name. If the developer followed conventions, the class is called dht.

dht DHT;

This creates an instance of the class in a REALLY stupid way. Calling the instance the same name as the class, but in a different case, is like getting a dog, and calling it DOG. Really, can't anyone use some imagination?

  float temperature;
  temperature = dht.readTemperature();

This calls the readTemperature() method of the non-existent DHT instance. That is NOT possible. So, the compiler told you that.