What Spark does is connect Miss Brodie's personality as a teacher to her political embrace of fascism, which Spark depicts far more as misguided on Miss Brodie's part than as arising out of any deep evil in the teacher.
Miss Brodie believes in elites, which is why she is attracted to fascism. As a schoolteacher, for example, she tries to nurture an elite group of girls. She handpicks these students and calls them "the crème de la crème." In choosing them for extra nurture and attention, she is clearly helping to alleviate her own loneliness, but she also attempts to fill them with self-confidence and teach them to feel proud of being intelligent and excelling at school.
Miss Brodie has traveled to Hitler's Germany, and as some people were in the 1930s, she is filled with admiration for its cleanliness, order, and new prosperity, which she sees as the fruits of the fascist ideology. She does not, as many did, stay long enough to see the corruption, evil, and rot below the surface.
Because we come as readers to identify and appreciate Miss Brodie as a well-rounded character during the course of the novel, it can be a shock that she is so roundly condemned and fired when her political beliefs are leaked—although this is also an excuse to get rid of a teacher who some have long thought to be a problem. All in all, Spark shows us through Miss Brodie how people might be attracted to fascism before its deepest horrors come to light.