The ring of endomorphisms of a finite dimensional module