To draw a shape with a button using KineticJS, you can first create a stage and layer for your drawing. Then, create a button with KineticJS by specifying its properties such as position, size, and text. Next, define a function that will be called when the button is clicked.Within this function, you can use KineticJS to draw a shape of your choice, such as a rectangle or circle, onto the layer.