This question already has an answer here:

My latex editor is TeXstudio and I need to configure it to enable pdflatex -shell-escape, is it possible to do it? compile with pdfLaTex, use Windows 10 and MikteX 2.9

marked as duplicate by TeXnician, Community Dec 1 '18 at 17:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.