Step !: Choose your scarf. I have several that just aren't long enough to tie off and have them look nice. This pink one is one of them.
Line up the ends of your scarf with the right side of the fabric facing inward. Anchor under your machine foot and stitch a straight line down your fabric as close to the edge as possible. Or you can pin your fabric to hold it in place if you fear it's going to shift too much while running it through your machine.