I imagine this is a real nightmare to do with pen and paper only, but very easy with a computer. I used Excel, copied the numbers there in cells a1..e5, and made the equation

=sum(a1:e5)-174

nearby. Originally that gives 175 as the sum of the 25 numbers is 349 and 349-174 = 175. Next I started deleting numbers from the box until I ended up with zero, avoiding untraceable paths such as isolated numbers or three or more with only one neighbor. Once the equation gives a zero the sum of what is left is 174. If it is positive, delete some more; if negative, replace something and adjust. ctrl-z helps nicely. Here are a few of the prettier solutions I came up with.

12-10-17-13-16-12-17-11-11-15-12-16-10-13

A symmetrical horse shoe that starts and ends on the bottom row. Goes along the entire edge of the box, except for the bottom corners of the middle of the bottom row.

17-12-14-10-18-18-17-12-12-16-13-15

This one starts and ends at the top and bottom of the middle column. It goes through everything, except the leftmost and the rightmost column, and avoids all 11's.

10-17-11-15-12-16-10-17-13-15-12-16-10

My favorite. There are three 10's in the box and in this solution they are at the start, middle, and end of the line. The pattern doesn't use diagonal moves at all - it's a spiral that starts at the center and goes clockwise along the edge.

10-12-12-13-10-16-11-14-12-11-10-12-13-18

There are no solutions with diagonal moves only, but this is pretty close as b3 is the only"white square" missing. Start near the lower left corner, zigzag right, up along the d-column, zigzag left, and end up in b4.

There are heaps of other solutions if you wish to find your own. I hope this helps. ðŸ™‚