From what I read online both Durga and Shakti represent the female principle. What's the difference between them?
Another name of Goddess Durga is Adi Shakti, so Durga and Shakti are same.
However if we see Shakti as concept of energy, then Durga is the personification of every Shakti of the Universe which I also discuss here. It is also seen in the Durga Saptashati which is a part of Markandeya Purana. In the Saptashati it is clearly seen that Durga is the innate power of all Gods and thus she also manifests from power of all Gods at one time:
अन्येषां चैव देवानां शक्रादीनां शरीरतः।
निर्गतं सुमहत्तेजस्तच्चैक्यं समगच्छत॥११॥
अतीव तेजसः कूटं ज्वलन्तमिव पर्वतम्।
ददृशुस्ते सुरास्तत्र ज्वालाव्याप्तदिगन्तरम्॥१२॥
अतुलं तत्र तत्तेजः सर्वदेवशरीरजम्।
एकस्थं तदभून्नारी व्याप्तलोकत्रयं त्विषा॥१३॥ (Durga Saptashati chapter 2)
An immense mass of light (Teja) proceeded from the bodies of Sakra and all the other Devas, and conglomerated. This effulgent lustre appeared as a flaming mountain: the Suras having seen the flame receded to the extremities of regions. The peerless light (Teja) issued from the bodies of all the Devas and the phenomenon was transfigured as a woman extending through the three worlds.
So, the above passage clearly shows that Durga is personified energy (Shakti/Teja). She is called feminine principle because she is ever associated with the Purusha in every body and she is the active principle which runs the universe. For eg. Saptashati also states:
विश्वस्योपरतौ शक्ते नारायणि नमोऽस्तु ते॥ (Durga Saptashati chapter 11)
Salutations to Narayani, who protects all things in a spiritual and material form, who is the over-ruling power/ Shakti (Viswashyo Paratau Shakti) of the universe.
तस्य सर्वस्य या शक्तिः सा त्वं किं स्तूयसे तदा ।
यया त्वया जगत्स्रष्टा जगत्पात्यत्ति यो जगत्॥ (Durga Saptashati chapter 1)
You are the Shakti of everyone, how can one praise you. You are the creator and the destructor of the Universe.
Thus if we think Shakti as the power/energy governing the Universe then Durga is personification of that power.
You are correct. It is a representation of the female principle. Both Durga and Sakti are representations of the female principle. the goddess Durga refers to the female principle when seen with certain aspects or attributes. In his book, The Gospel of Sri Ramakrishna (available here - http://www.belurmath.org/gospel/index.htm), in his Glossary, Swami Nikhilananda gives the following definitions:
Durga A name of the Divine Mother.
Sakti [or Shakti] Power, generally the Creative Power of Brahman; a name of the Divine Mother.
The Unmanifested Brahman is often depicted as Siva (male), and the Manifested Brahman, Brahman in Its creative aspect, as Sakti (female). Since females create life by giving birth, It (Brahman Manifest, or Isvara) is seen as female and commonly referred to as the Divine Mother.
There are mythical stories in the various Puranas that depict Durga and Shakti as anthropomorphic figures also.